summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 14e940d)
raw | patch | inline | side by side (parent: 14e940d)
author | Jens Lehmann <Jens.Lehmann@web.de> | |
Tue, 9 Mar 2010 14:55:32 +0000 (15:55 +0100) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Wed, 10 Mar 2010 07:15:01 +0000 (23:15 -0800) |
When calling "git submodule summary HEAD" on an unborn branch the output
was empty even when it shouldn't have been ("git submodule summary"
without the HEAD argument prints the expected output since commit
"submodule summary: do not fail before the first commit").
This also fixes "git status" to emit the "Submodule changes to be
committed" section on an unborn branch when used with the
status.submodulesummary config option.
Signed-off-by: Jens Lehmann <Jens.Lehmann@web.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
was empty even when it shouldn't have been ("git submodule summary"
without the HEAD argument prints the expected output since commit
"submodule summary: do not fail before the first commit").
This also fixes "git status" to emit the "Submodule changes to be
committed" section on an unborn branch when used with the
status.submodulesummary config option.
Signed-off-by: Jens Lehmann <Jens.Lehmann@web.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
git-submodule.sh | patch | blob | history |
diff --git a/git-submodule.sh b/git-submodule.sh
index 9aa57dd6f7c939ec3d50386a039f1640ce2aa929..5a9d3c0b305cc57e45b8f15b0d2c522bb8bb3285 100755 (executable)
--- a/git-submodule.sh
+++ b/git-submodule.sh
then
# before the first commit: compare with an empty tree
head=$(git hash-object -w -t tree --stdin </dev/null)
+ test -z "$1" || shift
else
head="HEAD"
fi