@matheusbsbs / matheus-bagliano / commits / caa9c3cabe
Fork 0

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>

Jeff King committed Mar 3, 2010 at 14:19 UTC caa9c3cabe9c2719a340425db5c0968fd3588fc9
1 file changed +1 -1
git-submodule.sh
+1 -1
@@ -556,7 +556,7 @@ cmd_summary() {
556 if rev=$(git rev-parse -q --verify --default HEAD ${1+"$1"})
557 then
558 head=$rev
559 - shift
559 + test $# = 0 || shift
560 elif test -z "$1" -o "$1" = "HEAD"
561 then
562 return