Code

git-submodule: move ill placed shift.
authorPierre Habouzit <madcoder@debian.org>
Mon, 21 Jul 2008 18:15:59 +0000 (20:15 +0200)
committerJunio C Hamano <gitster@pobox.com>
Tue, 22 Jul 2008 05:36:29 +0000 (22:36 -0700)
When running git submodule update -i, the "-i" is shifted before recursing
into cmd_init and then again outside of the loop. This causes some /bin/sh
to complain about shifting when there are no arguments left (and would
discard anything written after -i too).

Signed-off-by: Pierre Habouzit <madcoder@debian.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
git-submodule.sh

index 9228f56bee7fd82d530a6865f1f8669fd9b99d8f..b40f876a2ca9fe985cedc622ab28a9f461edc5ab 100755 (executable)
@@ -264,6 +264,7 @@ cmd_update()
        do
                case "$1" in
                -q|--quiet)
+                       shift
                        quiet=1
                        ;;
                -i|--init)
@@ -281,7 +282,6 @@ cmd_update()
                        break
                        ;;
                esac
-               shift
        done
 
        git ls-files --stage -- "$@" | grep '^160000 ' |