diff options
author | Jeff King <peff@peff.net> | 2010-03-03 14:19:09 -0800 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2010-03-03 14:33:21 -0800 |
commit | caa9c3cabe9c2719a340425db5c0968fd3588fc9 (patch) | |
tree | e04b4645c5684dc131aadb4ba9e8698662e5aa1b /git-submodule.sh | |
parent | 3deea89c5feb0dfdfb99ea752f83497d97a3bdd5 (diff) | |
download | git-caa9c3cabe9c2719a340425db5c0968fd3588fc9.tar.gz |
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>
Diffstat (limited to 'git-submodule.sh')
-rwxr-xr-x | git-submodule.sh | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/git-submodule.sh b/git-submodule.sh index 5869c00f2d..383dc45119 100755 --- a/git-submodule.sh +++ b/git-submodule.sh @@ -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 |