Skip to content

Commit

Permalink
Merge branch 'jh/maint-submodule-status-in-void'
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
Junio C Hamano committed Mar 24, 2010
2 parents a86ed83 + 2ea6c2c commit 5e4f614
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion git-submodule.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 5e4f614

Please sign in to comment.