{"thread":{"id":"14571","subject":"[PATCH] git-submodule: move ill placed shift.","startedAt":"2008-07-21T18:15:59Z","lastAt":"2008-07-21T18:15:59Z","messageCount":1,"participants":["Pierre Habouzit"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"84211","messageId":"1216664159-2643-1-git-send-email-madcoder@debian.org","threadId":"14571","inReplyTo":null,"subject":"[PATCH] git-submodule: move ill placed shift.","fromName":"Pierre Habouzit","fromEmail":"madcoder@debian.org","sentAt":"2008-07-21T18:15:59Z","receivedAt":"2008-07-21T18:15:59Z","isPatch":true,"sender":{"key":"madcoder@debian.org","avatar":"https://avatars.githubusercontent.com/u/44708?v=4"},"body":"When running git submodule update -i, the \"-i\" is shifted before recursing\ninto cmd_init and then again outside of the loop. This causes some /bin/sh\nto complain about shifting when there are no arguments left (and would\ndiscard anything written after -i too).\n\nSigned-off-by: Pierre Habouzit <madcoder@debian.org>\n---\n git-submodule.sh |    2 +-\n 1 files changed, 1 insertions(+), 1 deletions(-)\n\ndiff --git a/git-submodule.sh b/git-submodule.sh\nindex 9228f56..b40f876 100755\n--- a/git-submodule.sh\n+++ b/git-submodule.sh\n@@ -264,6 +264,7 @@ cmd_update()\n \tdo\n \t\tcase \"$1\" in\n \t\t-q|--quiet)\n+\t\t\tshift\n \t\t\tquiet=1\n \t\t\t;;\n \t\t-i|--init)\n@@ -281,7 +282,6 @@ cmd_update()\n \t\t\tbreak\n \t\t\t;;\n \t\tesac\n-\t\tshift\n \tdone\n \n \tgit ls-files --stage -- \"$@\" | grep '^160000 ' |\n-- \n1.6.0.rc0.138.g5af7f.dirty\n"}]}