From: Jens Lehmann Date: Tue, 9 Mar 2010 14:55:32 +0000 (+0100) Subject: git submodule summary: Handle HEAD as argument when on an unborn branch X-Git-Tag: v1.7.1-rc0~42^2 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=2ea6c2c9ab6555cbd48ca017bf5027162707a0b1;p=git.git 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 Signed-off-by: Junio C Hamano --- diff --git a/git-submodule.sh b/git-submodule.sh index 9aa57dd6f..5a9d3c0b3 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