mirror of
https://github.com/git/git
synced 2024-08-27 11:39:22 +00:00
submodule summary: do not shift a non-existent positional variable
When "git submodule summary" is run without any argument, we default to compare the state of index with the HEAD, but tried to shift out $1 that does not exist (and worse yet, we didn't use it). Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
parent
3deea89c5f
commit
caa9c3cabe
|
@ -556,7 +556,7 @@ cmd_summary() {
|
|||
if rev=$(git rev-parse -q --verify --default HEAD ${1+"$1"})
|
||||
then
|
||||
head=$rev
|
||||
shift
|
||||
test $# = 0 || shift
|
||||
elif test -z "$1" -o "$1" = "HEAD"
|
||||
then
|
||||
return
|
||||
|
|
Loading…
Reference in a new issue