]> rtime.felk.cvut.cz Git - git.git/blobdiff - git-submodule.sh
Documentation/pretty-{formats,options}: better reference for "format:<string>"
[git.git] / git-submodule.sh
index f21d0bfce7020edeaed8c0066760e5f55e7facb9..3319b836b217a26b4ac55ae5ced328ffafa0a015 100755 (executable)
@@ -21,6 +21,8 @@ command=
 branch=
 reference=
 cached=
+recursive=
+init=
 files=
 nofetch=
 update=
@@ -559,7 +561,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