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
00332b8152c541fcb8887019bb04dd425739d038
1 file changed
+1
-1
git-submodule.sh
+1
-1
@@ -269,6 +269,7 @@ cmd_update()
269
do
270
case "$1" in
271
-q|--quiet)
272
+ shift
273
quiet=1
274
;;
275
-i|--init)
@@ -286,7 +287,6 @@ cmd_update()
287
break
288
;;
289
esac
289
- shift
290
done
291
292
git ls-files --stage -- "$@" | grep '^160000 ' |