git-submodule: move ill placed shift.

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>
This commit is contained in:
Pierre Habouzit 2008-07-21 20:15:59 +02:00 committed by Junio C Hamano
parent 5d2299de2d
commit d1f63a37ca

View File

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