Merge branch 'jh/maint-submodule-status-in-void' into next

* jh/maint-submodule-status-in-void:
  submodule summary: do not fail before the first commit
This commit is contained in:
Junio C Hamano
2010-03-08 18:31:34 -08:00

View File

@@ -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