1
0
mirror of https://github.com/git/git.git synced 2024-11-18 19:13:58 +01:00

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

* jh/maint-submodule-status-in-void:
  git submodule summary: Handle HEAD as argument when on an unborn branch
  submodule summary: do not fail before the first commit
This commit is contained in:
Junio C Hamano 2010-03-24 16:55:37 -07:00
commit 5e4f614742

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