remote: remove add_prune_tags_to_fetch_refspec

Remove 'add_prune_tags_to_fetch_refspec()' function and instead have the only caller directly add the tag refspec using 'refspec_append()'. Signed-off-by: Brandon Williams <bmwill@google.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Brandon Williams committed May 16, 2018 at 15:58 UTC 953035009601a971137ecc2c7d5e662189cfda50
3 files changed +1 -8
builtin/fetch.c
+1 -1
@@ -1392,7 +1392,7 @@ static int fetch_one(struct remote *remote, int argc, const char **argv, int pru
1392
1393 maybe_prune_tags = prune_tags_ok && prune_tags;
1394 if (maybe_prune_tags && remote_via_config)
1395 - add_prune_tags_to_fetch_refspec(remote);
1395 + refspec_append(&remote->fetch, TAG_REFSPEC);
1396
1397 if (argc > 0 || (maybe_prune_tags && !remote_via_config)) {
1398 size_t nr_alloc = st_add3(argc, maybe_prune_tags, 1);
remote.c
-5
@@ -77,11 +77,6 @@ static const char *alias_url(const char *url, struct rewrites *r)
77 return xstrfmt("%s%s", r->rewrite[longest_i]->base, url + longest->len);
78 }
79
80 -void add_prune_tags_to_fetch_refspec(struct remote *remote)
81 -{
82 - refspec_append(&remote->fetch, TAG_REFSPEC);
83 -}
84 -
80 static void add_url(struct remote *remote, const char *url)
81 {
82 ALLOC_GROW(remote->url, remote->url_nr + 1, remote->url_alloc);
remote.h
-2
@@ -290,6 +290,4 @@ extern int parseopt_push_cas_option(const struct option *, const char *arg, int
290 extern int is_empty_cas(const struct push_cas_option *);
291 void apply_push_cas(struct push_cas_option *, struct remote *, struct ref *);
292
293 -void add_prune_tags_to_fetch_refspec(struct remote *remote);
294 -
293 #endif