summaryrefslogtreecommitdiff
path: root/builtin
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2019-05-19 07:45:28 (GMT)
committerJunio C Hamano <gitster@pobox.com>2019-05-19 07:45:28 (GMT)
commit2cfab6087790ceeb81eb91eeb1300500cfa4c948 (patch)
tree12b60cadde36404d455a1adc53bc626af4704565 /builtin
parent4ac8371a1ce0df07a2c3389d6acf6c35207a54fa (diff)
parent5c387428f10c27c24d3adb890cd466e2300518fa (diff)
downloadgit-2cfab6087790ceeb81eb91eeb1300500cfa4c948.zip
git-2cfab6087790ceeb81eb91eeb1300500cfa4c948.tar.gz
git-2cfab6087790ceeb81eb91eeb1300500cfa4c948.tar.bz2
Merge branch 'nd/parse-options-aliases'
Attempt to use an abbreviated option in "git clone --recurs" is responded by a request to disambiguate between --recursive and --recurse-submodules, which is bad because these two are synonyms. The parse-options API has been extended to define such synonyms more easily and not produce an unnecessary failure. * nd/parse-options-aliases: parse-options: don't emit "ambiguous option" for aliases
Diffstat (limited to 'builtin')
-rw-r--r--builtin/clone.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/builtin/clone.c b/builtin/clone.c
index ffdd94e..85b0d31 100644
--- a/builtin/clone.c
+++ b/builtin/clone.c
@@ -99,10 +99,7 @@ static struct option builtin_clone_options[] = {
N_("don't use local hardlinks, always copy")),
OPT_BOOL('s', "shared", &option_shared,
N_("setup as shared repository")),
- { OPTION_CALLBACK, 0, "recursive", &option_recurse_submodules,
- N_("pathspec"), N_("initialize submodules in the clone"),
- PARSE_OPT_OPTARG | PARSE_OPT_HIDDEN, recurse_submodules_cb,
- (intptr_t)"." },
+ OPT_ALIAS(0, "recursive", "recurse-submodules"),
{ OPTION_CALLBACK, 0, "recurse-submodules", &option_recurse_submodules,
N_("pathspec"), N_("initialize submodules in the clone"),
PARSE_OPT_OPTARG, recurse_submodules_cb, (intptr_t)"." },