Skip to content

Commit d1f63a3

Browse files
MadCodergitster
authored andcommitted
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 <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 5d2299d commit d1f63a3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

git-submodule.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -264,6 +264,7 @@ cmd_update()
264264
do
265265
case "$1" in
266266
-q|--quiet)
267+
shift
267268
quiet=1
268269
;;
269270
-i|--init)
@@ -281,7 +282,6 @@ cmd_update()
281282
break
282283
;;
283284
esac
284-
shift
285285
done
286286

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

0 commit comments

Comments
 (0)