From: Pierre Habouzit Date: Mon, 21 Jul 2008 18:15:59 +0000 (+0200) Subject: git-submodule: move ill placed shift. X-Git-Tag: v1.5.6.5~14 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=00332b8152c541fcb8887019bb04dd425739d038;p=git.git 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 Signed-off-by: Junio C Hamano --- diff --git a/git-submodule.sh b/git-submodule.sh index 099a7d756..21e5b5b7d 100755 --- a/git-submodule.sh +++ b/git-submodule.sh @@ -269,6 +269,7 @@ cmd_update() do case "$1" in -q|--quiet) + shift quiet=1 ;; -i|--init) @@ -286,7 +287,6 @@ cmd_update() break ;; esac - shift done git ls-files --stage -- "$@" | grep '^160000 ' |