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, "-no-color": complete.PredictNothing,
"-plugin-dir": complete.PredictDirs(""), "-plugin-dir": complete.PredictDirs(""),
"-reconfigure": complete.PredictNothing, "-reconfigure": complete.PredictNothing,
"-migrate-state": complete.PredictNothing,
"-upgrade": completePredictBoolean, "-upgrade": completePredictBoolean,
} }
} }
@ -987,6 +988,9 @@ Options:
-reconfigure Reconfigure the backend, ignoring any saved -reconfigure Reconfigure the backend, ignoring any saved
configuration. configuration.
-migrate-state Reconfigure the backend, and attempt to migrate any
existing state.
-upgrade=false If installing modules (-get) or plugins, ignore -upgrade=false If installing modules (-get) or plugins, ignore
previously-downloaded objects and install the previously-downloaded objects and install the
latest version allowed within configured constraints. 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. is initialized using the given configuration settings.
Re-running init with an already-initialized backend will update the working Re-running init with an already-initialized backend will update the working
directory to use the new backend settings. Depending on what changed, this directory to use the new backend settings. Either `-reconfigure` or
may result in interactive prompts to confirm migration of workspace states. `-migrate-state` must be supplied to update the backend configuration.
The `-force-copy` option suppresses these prompts and answers "yes" to the
migration questions. The `-reconfigure` option disregards any existing The `-migrate-state` option will attempt to copy existing state to the new
configuration, preventing migration of any existing state. 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 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 steps require an initialized backend, so it is recommended to use this flag only