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>

Stefan Beller committed Aug 15, 2016 at 14:53 UTC 5e40800df2ef1045d377f01caccee89c83beffab
1 file changed +4 -4
builtin/clone.c
+4 -4
@@ -50,7 +50,7 @@ static int option_verbosity;
50 static int option_progress = -1;
51 static enum transport_family family;
52 static struct string_list option_config = STRING_LIST_INIT_NODUP;
53 -static struct string_list option_reference = STRING_LIST_INIT_NODUP;
53 +static struct string_list option_required_reference = STRING_LIST_INIT_NODUP;
54 static int option_dissociate;
55 static int max_jobs = -1;
56
@@ -79,7 +79,7 @@ static struct option builtin_clone_options[] = {
79 N_("number of submodules cloned in parallel")),
80 OPT_STRING(0, "template", &option_template, N_("template-directory"),
81 N_("directory from which templates will be used")),
82 - OPT_STRING_LIST(0, "reference", &option_reference, N_("repo"),
82 + OPT_STRING_LIST(0, "reference", &option_required_reference, N_("repo"),
83 N_("reference repository")),
84 OPT_BOOL(0, "dissociate", &option_dissociate,
85 N_("use --reference only while cloning")),
@@ -300,7 +300,7 @@ static int add_one_reference(struct string_list_item *item, void *cb_data)
300
301 static void setup_reference(void)
302 {
303 - for_each_string_list(&option_reference, add_one_reference, NULL);
303 + for_each_string_list(&option_required_reference, add_one_reference, NULL);
304 }
305
306 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)
952 git_config_set(key.buf, repo);
953 strbuf_reset(&key);
954
955 - if (option_reference.nr)
955 + if (option_required_reference.nr)
956 setup_reference();
957
958 fetch_pattern = value.buf;