Code

git submodule summary: Handle HEAD as argument when on an unborn branch
[git.git] / git-submodule.sh
index 9aa57dd6f7c939ec3d50386a039f1640ce2aa929..5a9d3c0b305cc57e45b8f15b0d2c522bb8bb3285 100755 (executable)
@@ -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