builtin/clone: move around setup_reference()
In a subsequent commit, `setup_reference()` will start to call `copy_alternates()`. Prepare for this by moving the function further down so that we can avoid adding a declaration. Signed-off-by: Patrick Steinhardt <ps@pks.im> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
1 parent
dc33728d9d
commit
f7aeeae668
1 file changed
+10
-10
+10
-10
@@ -179,16 +179,6 @@ static int add_one_reference(struct string_list_item *item, void *cb_data)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void setup_reference(void)
|
||||
{
|
||||
int required = 1;
|
||||
for_each_string_list(&option_required_reference,
|
||||
add_one_reference, &required);
|
||||
required = 0;
|
||||
for_each_string_list(&option_optional_reference,
|
||||
add_one_reference, &required);
|
||||
}
|
||||
|
||||
static void copy_alternates(struct strbuf *src, const char *src_repo)
|
||||
{
|
||||
/*
|
||||
@@ -228,6 +218,16 @@ static void copy_alternates(struct strbuf *src, const char *src_repo)
|
||||
fclose(in);
|
||||
}
|
||||
|
||||
static void setup_reference(void)
|
||||
{
|
||||
int required = 1;
|
||||
for_each_string_list(&option_required_reference,
|
||||
add_one_reference, &required);
|
||||
required = 0;
|
||||
for_each_string_list(&option_optional_reference,
|
||||
add_one_reference, &required);
|
||||
}
|
||||
|
||||
static void mkdir_if_missing(const char *pathname, mode_t mode)
|
||||
{
|
||||
struct stat st;
|
||||
|
||||
Reference in new issue
Block a user