summaryrefslogtreecommitdiff
path: root/builtin
diff options
context:
space:
mode:
authorLibravatar Stefan Beller <sbeller@google.com>2016-08-15 14:53:25 -0700
committerLibravatar Junio C Hamano <gitster@pobox.com>2016-08-15 15:28:42 -0700
commit5e40800df2ef1045d377f01caccee89c83beffab (patch)
treee55ac7b7ceb63e8d7de9866d7f90b2bb27557e71 /builtin
parentclone: factor out checking for an alternate path (diff)
downloadtgif-5e40800df2ef1045d377f01caccee89c83beffab.tar.xz
clone: clarify option_reference as required
In the next patch we introduce optional references; To better distinguish between optional and required references we rename the variable. Signed-off-by: Stefan Beller <sbeller@google.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin')
-rw-r--r--builtin/clone.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/builtin/clone.c b/builtin/clone.c
index 4cd3a6691a..ef5db7c499 100644
--- a/builtin/clone.c
+++ b/builtin/clone.c
@@ -50,7 +50,7 @@ static int option_verbosity;
static int option_progress = -1;
static enum transport_family family;
static struct string_list option_config = STRING_LIST_INIT_NODUP;
-static struct string_list option_reference = STRING_LIST_INIT_NODUP;
+static struct string_list option_required_reference = STRING_LIST_INIT_NODUP;
static int option_dissociate;
static int max_jobs = -1;
@@ -79,7 +79,7 @@ static struct option builtin_clone_options[] = {
N_("number of submodules cloned in parallel")),
OPT_STRING(0, "template", &option_template, N_("template-directory"),
N_("directory from which templates will be used")),
- OPT_STRING_LIST(0, "reference", &option_reference, N_("repo"),
+ OPT_STRING_LIST(0, "reference", &option_required_reference, N_("repo"),
N_("reference repository")),
OPT_BOOL(0, "dissociate", &option_dissociate,
N_("use --reference only while cloning")),
@@ -300,7 +300,7 @@ static int add_one_reference(struct string_list_item *item, void *cb_data)
static void setup_reference(void)
{
- for_each_string_list(&option_reference, add_one_reference, NULL);
+ for_each_string_list(&option_required_reference, add_one_reference, NULL);
}
static void copy_alternates(struct strbuf *src, struct strbuf *dst,
@@ -952,7 +952,7 @@ int cmd_clone(int argc, const char **argv, const char *prefix)
git_config_set(key.buf, repo);
strbuf_reset(&key);
- if (option_reference.nr)
+ if (option_required_reference.nr)
setup_reference();
fetch_pattern = value.buf;