git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] git-submodule: move ill placed shift.
@ 2008-07-21 18:15 Pierre Habouzit
  0 siblings, 0 replies; only message in thread
From: Pierre Habouzit @ 2008-07-21 18:15 UTC (permalink / raw)
  To: git; +Cc: gitster, Pierre Habouzit

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>
---
 git-submodule.sh |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/git-submodule.sh b/git-submodule.sh
index 9228f56..b40f876 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 ' |
-- 
1.6.0.rc0.138.g5af7f.dirty

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2008-07-21 18:17 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-07-21 18:15 [PATCH] git-submodule: move ill placed shift Pierre Habouzit

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).