diff options
author | Stefan Zager <szager@google.com> | 2012-07-25 10:41:54 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2012-08-24 09:00:43 -0700 |
commit | 01d4721565f1562172149ebb91d29d6a7e7f922d (patch) | |
tree | 6ce6aaf48e78dc3de1a0983206a7eeb4370ad182 /Documentation/git-submodule.txt | |
parent | e6dfbcf12b0e70897818cb36903de0625931a5c6 (diff) | |
download | git-01d4721565f1562172149ebb91d29d6a7e7f922d.tar.gz |
Make 'git submodule update --force' always check out submodules.
Currently, it will only do a checkout if the sha1 registered in the containing
repository doesn't match the HEAD of the submodule, regardless of whether the
submodule is dirty. As discussed on the mailing list, the '--force' flag is a
strong indicator that the state of the submodule is suspect, and should be reset
to HEAD.
Signed-off-by: Stefan Zager <szager@google.com>
Acked-by: Jens Lehmann <Jens.Lehmann@web.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'Documentation/git-submodule.txt')
-rw-r--r-- | Documentation/git-submodule.txt | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/Documentation/git-submodule.txt b/Documentation/git-submodule.txt index fbbbcb282c..2de7bf0900 100644 --- a/Documentation/git-submodule.txt +++ b/Documentation/git-submodule.txt @@ -149,6 +149,11 @@ submodule with the `--init` option. + If `--recursive` is specified, this command will recurse into the registered submodules, and update any nested submodules within. ++ +If `--force` is specified, the submodule will be checked out (using +`git checkout --force` if appropriate), even if the commit specified in the +index of the containing repository already matches the commit checked out in +the submodule. summary:: Show commit summary between the given commit (defaults to HEAD) and @@ -210,7 +215,9 @@ OPTIONS This option is only valid for add and update commands. When running add, allow adding an otherwise ignored submodule path. When running update, throw away local changes in submodules when - switching to a different commit. + switching to a different commit; and always run a checkout operation + in the submodule, even if the commit listed in the index of the + containing repository matches the commit checked out in the submodule. --cached:: This option is only valid for status and summary commands. These |