ESMCI / git-fleximod

MIT License
2 stars 2 forks source link

Include "hints" for how to proceed when an "M" is encountered #26

Closed cacraigucar closed 3 months ago

cacraigucar commented 3 months ago

A user who tested git-fleximod ended up with an "M" and wasn't sure what to do. When I suggested an error message something along the lines of what manage_externals spits out, they agreed that that would be helpful.

What manage_externals spits out:

The external repositories labeled with 'M' above are not in a clean state.
The following are four options for how to proceed:
(1) Go into each external that is not in a clean state and issue either a 'git status' or
    an 'svn status' command (depending on whether the external is managed by git or
    svn). Either revert or commit your changes so that all externals are in a clean
    state. (To revert changes in git, follow the instructions given when you run 'git
    status'.) (Note, though, that it is okay to have untracked files in your working
    directory.) Then rerun checkout_externals.
(2) Alternatively, you do not have to rely on checkout_externals. Instead, you can manually
    update out-of-sync externals (labeled with 's' above) as described in the
    configuration file Externals.cfg. (For example, run 'git fetch' and 'git checkout'
    commands to checkout the appropriate tags for each external, as given in
    Externals.cfg.)
(3) You can also use checkout_externals to manage most, but not all externals: You can specify
    one or more externals to ignore using the '-x' or '--exclude' argument to
    checkout_externals. Excluding externals labeled with 'M' will allow checkout_externals to
    update the other, non-excluded externals.
(4) As a last resort, if you are confident that there is no work that needs to be saved
    from a given external, you can remove that external (via "rm -rf [directory]") and
    then rerun the checkout_externals tool. This option is mainly useful as a workaround for
    issues with this tool (such as https://github.com/ESMCI/manage_externals/issues/157).
The external repositories labeled with '?' above are not under version
control using the expected protocol. If you are sure you want to switch
protocols, and you don't have any work you need to save from this
directory, then run "rm -rf [directory]" before rerunning the
checkout_externals tool.