submodule add: fix handling of --reference=<repo> option
authorStefan Zager <szager@google.com>
Thu, 25 Oct 2012 04:52:52 +0000 (21:52 -0700)
committerJeff King <peff@peff.net>
Fri, 26 Oct 2012 14:32:31 +0000 (10:32 -0400)
Doing a shift here is wrong because there is no extra
argument to consume when "--reference=<repo>" is used (note
the '=' instead of a space).

Signed-off-by: Stefan Zager <szager@google.com>
Signed-off-by: Jeff King <peff@peff.net>
git-submodule.sh
index ab6b1107b6090494f192f361471ed5748ffa7dc1..dcceb43d714ac0829883581de32973d3cb7ca717 100755 (executable)
@@ -270,7 +270,6 @@ cmd_add()
                        ;;
                --reference=*)
                        reference="$1"
-                       shift
                        ;;
                --)
                        shift