diff options
author | Jens Lehmann <Jens.Lehmann@web.de> | 2010-01-17 20:42:31 +0100 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2010-01-17 15:55:11 -0800 |
commit | f17a5d34948363087db94a1cb2c3c715c1ada2d8 (patch) | |
tree | f722090e75900ee30dd81837f89564feab0fc267 /git-submodule.sh | |
parent | 8e08b4198c40cd6d3a5d1a7e60a599adabece08e (diff) | |
download | git-f17a5d34948363087db94a1cb2c3c715c1ada2d8.tar.gz |
git status: Show uncommitted submodule changes too when enabled
When the configuration variable status.submodulesummary is not 0 or
false, "git status" shows the submodule summary of the staged submodule
commits. But it did not show the summary of those commits not yet
staged in the supermodule, making it hard to see what will not be
committed.
The output of "submodule summary --for-status" has been changed from
"# Modified submodules:" to "# Submodule changes to be committed:" for
the already staged changes. "# Submodules changed but not updated:" has
been added for changes that will not be committed. This is much clearer
and consistent with the output for regular files.
Signed-off-by: Jens Lehmann <Jens.Lehmann@web.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'git-submodule.sh')
-rwxr-xr-x | git-submodule.sh | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/git-submodule.sh b/git-submodule.sh index 77d223292c..664f21721c 100755 --- a/git-submodule.sh +++ b/git-submodule.sh @@ -688,7 +688,11 @@ cmd_summary() { echo done | if test -n "$for_status"; then - echo "# Modified submodules:" + if [ -n "$files" ]; then + echo "# Submodules changed but not updated:" + else + echo "# Submodule changes to be committed:" + fi echo "#" sed -e 's|^|# |' -e 's|^# $|#|' else |