author | Junio C Hamano <gitster@pobox.com> | |
Tue, 15 Jan 2008 10:48:45 +0000 (02:48 -0800) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Mon, 21 Jan 2008 04:57:42 +0000 (20:57 -0800) | ||
commit | 5c08dbbdf1a2d2565606bb43f7e42a5968fcbdf1 | |
tree | db9739be96336cd499850fbf71dcd750a405f939 | tree | snapshot |
parent | 23a485e3ee32a9445e1c20bd4fd4b93119cd4f7c | commit | diff |
git-submodule: fix subcommand parser
The subcommand parser of "git submodule" made its subcommand
names reserved words. As a consequence, a command like this:
$ git submodule add init update
which is meant to add a submodule called 'init' at path 'update'
was misinterpreted as a request to invoke more than one mutually
incompatible subcommands and incorrectly rejected.
This patch fixes the issue by stopping the subcommand parsing at
the first subcommand word, to allow the sample command line
above to work as expected.
It also introduces the usual -- option disambiguator, so that a
submodule at path '-foo' can be updated with
$ git submodule update -- -foo
without triggering an "unrecognized option -foo" error.
Signed-off-by: Junio C Hamano <gitster@pobox.com>
The subcommand parser of "git submodule" made its subcommand
names reserved words. As a consequence, a command like this:
$ git submodule add init update
which is meant to add a submodule called 'init' at path 'update'
was misinterpreted as a request to invoke more than one mutually
incompatible subcommands and incorrectly rejected.
This patch fixes the issue by stopping the subcommand parsing at
the first subcommand word, to allow the sample command line
above to work as expected.
It also introduces the usual -- option disambiguator, so that a
submodule at path '-foo' can be updated with
$ git submodule update -- -foo
without triggering an "unrecognized option -foo" error.
Signed-off-by: Junio C Hamano <gitster@pobox.com>
git-submodule.sh | diff | blob | history |