diff options
author | Jens Lehmann <Jens.Lehmann@web.de> | 2010-03-09 15:55:32 +0100 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2010-03-09 23:15:01 -0800 |
commit | 2ea6c2c9ab6555cbd48ca017bf5027162707a0b1 (patch) | |
tree | b42124725ef72eca364b503bbd6fdc10b29ebb1e /git-submodule.sh | |
parent | 14e940d719e9d3250b802fbc975210dafaf896d8 (diff) | |
download | git-2ea6c2c9ab6555cbd48ca017bf5027162707a0b1.tar.gz |
git submodule summary: Handle HEAD as argument when on an unborn branch
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>
Diffstat (limited to 'git-submodule.sh')
-rwxr-xr-x | git-submodule.sh | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/git-submodule.sh b/git-submodule.sh index 9aa57dd6f7..5a9d3c0b30 100755 --- a/git-submodule.sh +++ b/git-submodule.sh @@ -561,6 +561,7 @@ cmd_summary() { 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 |