Skip to content

Commit 7ca97f5

Browse files
committed
Merge branch 'ab/retire-string-list-init'
Code cleanup. * ab/retire-string-list-init: string-list.[ch]: remove string_list_init() compatibility function
2 parents 870de59 + abf897b commit 7ca97f5

File tree

3 files changed

+2
-15
lines changed

3 files changed

+2
-15
lines changed

remote-curl.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1478,8 +1478,8 @@ int cmd_main(int argc, const char **argv)
14781478
options.verbosity = 1;
14791479
options.progress = !!isatty(2);
14801480
options.thin = 1;
1481-
string_list_init(&options.deepen_not, 1);
1482-
string_list_init(&options.push_options, 1);
1481+
string_list_init_dup(&options.deepen_not);
1482+
string_list_init_dup(&options.push_options);
14831483

14841484
/*
14851485
* Just report "remote-curl" here (folding all the various aliases

string-list.c

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -13,14 +13,6 @@ void string_list_init_dup(struct string_list *list)
1313
memcpy(list, &blank, sizeof(*list));
1414
}
1515

16-
void string_list_init(struct string_list *list, int strdup_strings)
17-
{
18-
if (strdup_strings)
19-
string_list_init_dup(list);
20-
else
21-
string_list_init_nodup(list);
22-
}
23-
2416
/* if there is no exact match, point to the index where the entry could be
2517
* inserted */
2618
static int get_entry_index(const struct string_list *list, const char *string,

string-list.h

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -104,11 +104,6 @@ struct string_list {
104104
void string_list_init_nodup(struct string_list *list);
105105
void string_list_init_dup(struct string_list *list);
106106

107-
/**
108-
* TODO remove: For compatibility with any in-flight older API users
109-
*/
110-
void string_list_init(struct string_list *list, int strdup_strings);
111-
112107
/** Callback function type for for_each_string_list */
113108
typedef int (*string_list_each_func_t)(struct string_list_item *, void *);
114109

0 commit comments

Comments
 (0)