diff options
-rwxr-xr-x | git-submodule.sh | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/git-submodule.sh b/git-submodule.sh index f21d0bfce7..2dd372a21d 100755 --- a/git-submodule.sh +++ b/git-submodule.sh @@ -559,7 +559,9 @@ cmd_summary() { test $# = 0 || shift elif test -z "$1" -o "$1" = "HEAD" then - return + # 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 |