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

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>

Pierre Habouzit committed Jul 21, 2008 at 20:15 UTC d1f63a37caae19314bbd55c9fe3554d2e53537e7
1 file changed +1 -1
git-submodule.sh
+1 -1
@@ -264,6 +264,7 @@ cmd_update()
264 do
265 case "$1" in
266 -q|--quiet)
267 + shift
268 quiet=1
269 ;;
270 -i|--init)
@@ -281,7 +282,6 @@ cmd_update()
282 break
283 ;;
284 esac
284 - shift
285 done
286
287 git ls-files --stage -- "$@" | grep '^160000 ' |