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:
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
|
||||
|
Loading…
Reference in New Issue
Block a user