Skip to content

Commit

Permalink
git-submodule: move ill placed shift.
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Pierre Habouzit authored and Junio C Hamano committed Aug 2, 2008
1 parent 734a6ff commit 00332b8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion git-submodule.sh
Original file line number Diff line number Diff line change
Expand Up @@ -269,6 +269,7 @@ cmd_update()
do
case "$1" in
-q|--quiet)
shift
quiet=1
;;
-i|--init)
Expand All @@ -286,7 +287,6 @@ cmd_update()
break
;;
esac
shift
done

git ls-files --stage -- "$@" | grep '^160000 ' |
Expand Down

0 comments on commit 00332b8

Please sign in to comment.