diff options
author | Junio C Hamano <gitster@pobox.com> | 2021-10-06 23:40:13 +0300 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2021-10-06 23:40:13 +0300 |
commit | 7ca97f5222f43bf9ad4a7bb45505da4e15eac4be (patch) | |
tree | 646dac2875f2ddfcf0aa4925efa86640ac4ad9f2 | |
parent | 870de59af079cca5a7d99397f2fc02ab7143d491 (diff) | |
parent | abf897bacd2d36b9dbd07c70b4a2f97a084704ee (diff) |
Merge branch 'ab/retire-string-list-init'
Code cleanup.
* ab/retire-string-list-init:
string-list.[ch]: remove string_list_init() compatibility function
-rw-r--r-- | remote-curl.c | 4 | ||||
-rw-r--r-- | string-list.c | 8 | ||||
-rw-r--r-- | string-list.h | 5 |
3 files changed, 2 insertions, 15 deletions
diff --git a/remote-curl.c b/remote-curl.c index 598cff7cde..3f5688e426 100644 --- a/remote-curl.c +++ b/remote-curl.c @@ -1478,8 +1478,8 @@ int cmd_main(int argc, const char **argv) options.verbosity = 1; options.progress = !!isatty(2); options.thin = 1; - string_list_init(&options.deepen_not, 1); - string_list_init(&options.push_options, 1); + string_list_init_dup(&options.deepen_not); + string_list_init_dup(&options.push_options); /* * Just report "remote-curl" here (folding all the various aliases diff --git a/string-list.c b/string-list.c index 43576ad126..549fc416d6 100644 --- a/string-list.c +++ b/string-list.c @@ -13,14 +13,6 @@ void string_list_init_dup(struct string_list *list) memcpy(list, &blank, sizeof(*list)); } -void string_list_init(struct string_list *list, int strdup_strings) -{ - if (strdup_strings) - string_list_init_dup(list); - else - string_list_init_nodup(list); -} - /* if there is no exact match, point to the index where the entry could be * inserted */ static int get_entry_index(const struct string_list *list, const char *string, diff --git a/string-list.h b/string-list.h index 0d6b469239..267d6e5769 100644 --- a/string-list.h +++ b/string-list.h @@ -104,11 +104,6 @@ struct string_list { void string_list_init_nodup(struct string_list *list); void string_list_init_dup(struct string_list *list); -/** - * TODO remove: For compatibility with any in-flight older API users - */ -void string_list_init(struct string_list *list, int strdup_strings); - /** Callback function type for for_each_string_list */ typedef int (*string_list_each_func_t)(struct string_list_item *, void *); |