From d1f63a37caae19314bbd55c9fe3554d2e53537e7 Mon Sep 17 00:00:00 2001 From: Pierre Habouzit Date: Mon, 21 Jul 2008 20:15:59 +0200 Subject: [PATCH] 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 --- git-submodule.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/git-submodule.sh b/git-submodule.sh index 9228f56be..b40f876a2 100755 --- a/git-submodule.sh +++ b/git-submodule.sh @@ -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 ' | -- 2.26.2