Skip to content

Commit 5e40800

Browse files
stefanbellergitster
authored andcommitted
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 <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 9eeea7d commit 5e40800

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

builtin/clone.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ static int option_verbosity;
5050
static int option_progress = -1;
5151
static enum transport_family family;
5252
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;
5454
static int option_dissociate;
5555
static int max_jobs = -1;
5656

@@ -79,7 +79,7 @@ static struct option builtin_clone_options[] = {
7979
N_("number of submodules cloned in parallel")),
8080
OPT_STRING(0, "template", &option_template, N_("template-directory"),
8181
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"),
8383
N_("reference repository")),
8484
OPT_BOOL(0, "dissociate", &option_dissociate,
8585
N_("use --reference only while cloning")),
@@ -300,7 +300,7 @@ static int add_one_reference(struct string_list_item *item, void *cb_data)
300300

301301
static void setup_reference(void)
302302
{
303-
for_each_string_list(&option_reference, add_one_reference, NULL);
303+
for_each_string_list(&option_required_reference, add_one_reference, NULL);
304304
}
305305

306306
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)
952952
git_config_set(key.buf, repo);
953953
strbuf_reset(&key);
954954

955-
if (option_reference.nr)
955+
if (option_required_reference.nr)
956956
setup_reference();
957957

958958
fetch_pattern = value.buf;

0 commit comments

Comments
 (0)