update init docs for -migrate-state

This commit is contained in:
James Bardin 2021-05-17 12:19:36 -04:00
parent edc2695d18
commit 1b48636b42
2 changed files with 15 additions and 5 deletions

View File

@ -933,6 +933,7 @@ func (c *InitCommand) AutocompleteFlags() complete.Flags {
"-no-color": complete.PredictNothing,
"-plugin-dir": complete.PredictDirs(""),
"-reconfigure": complete.PredictNothing,
"-migrate-state": complete.PredictNothing,
"-upgrade": completePredictBoolean,
}
}
@ -987,6 +988,9 @@ Options:
-reconfigure Reconfigure the backend, ignoring any saved
configuration.
-migrate-state Reconfigure the backend, and attempt to migrate any
existing state.
-upgrade=false If installing modules (-get) or plugins, ignore
previously-downloaded objects and install the
latest version allowed within configured constraints.

View File

@ -79,11 +79,17 @@ During init, the root configuration directory is consulted for
is initialized using the given configuration settings.
Re-running init with an already-initialized backend will update the working
directory to use the new backend settings. Depending on what changed, this
may result in interactive prompts to confirm migration of workspace states.
The `-force-copy` option suppresses these prompts and answers "yes" to the
migration questions. The `-reconfigure` option disregards any existing
configuration, preventing migration of any existing state.
directory to use the new backend settings. Either `-reconfigure` or
`-migrate-state` must be supplied to update the backend configuration.
The `-migrate-state` option will attempt to copy existing state to the new
backend, and depending on what changed, may result in interactive prompts to
confirm migration of workspace states. The `-force-copy` option suppresses
these prompts and answers "yes" to the migration questions. This implies
`-migrate-state`.
The `-reconfigure` option disregards any existing configuration, preventing
migration of any existing state.
To skip backend configuration, use `-backend=false`. Note that some other init
steps require an initialized backend, so it is recommended to use this flag only