ls-remote: fall-back to default remotes when no remote specified
[gitweb.git] / git-submodule.sh
index f21d0bfce7020edeaed8c0066760e5f55e7facb9..2dd372a21d82a109774e80e014f9959485202b3e 100755 (executable)
@@ -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