summaryrefslogtreecommitdiff
path: root/git-submodule.sh
diff options
context:
space:
mode:
Diffstat (limited to 'git-submodule.sh')
-rwxr-xr-xgit-submodule.sh3
1 files changed, 2 insertions, 1 deletions
diff --git a/git-submodule.sh b/git-submodule.sh
index 383dc45..9aa57dd 100755
--- a/git-submodule.sh
+++ b/git-submodule.sh
@@ -559,7 +559,8 @@ 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)
else
head="HEAD"
fi