]> granicus.if.org Git - git/commitdiff
remote: remove add_prune_tags_to_fetch_refspec
authorBrandon Williams <bmwill@google.com>
Wed, 16 May 2018 22:58:02 +0000 (15:58 -0700)
committerJunio C Hamano <gitster@pobox.com>
Thu, 17 May 2018 21:19:43 +0000 (06:19 +0900)
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>
builtin/fetch.c
remote.c
remote.h

index 30083d4bc234046774ebf80c92a134df95f84eef..7a1637d35ebfbbb12ec27776b9164c4a3bcc48d0 100644 (file)
@@ -1392,7 +1392,7 @@ static int fetch_one(struct remote *remote, int argc, const char **argv, int pru
 
        maybe_prune_tags = prune_tags_ok && prune_tags;
        if (maybe_prune_tags && remote_via_config)
-               add_prune_tags_to_fetch_refspec(remote);
+               refspec_append(&remote->fetch, TAG_REFSPEC);
 
        if (argc > 0 || (maybe_prune_tags && !remote_via_config)) {
                size_t nr_alloc = st_add3(argc, maybe_prune_tags, 1);
index 26842ce37f28809589e939154fa3c6da15adf67f..4a9bddf0d7af66f2e1705bf459432ae69fd6735f 100644 (file)
--- a/remote.c
+++ b/remote.c
@@ -77,11 +77,6 @@ static const char *alias_url(const char *url, struct rewrites *r)
        return xstrfmt("%s%s", r->rewrite[longest_i]->base, url + longest->len);
 }
 
-void add_prune_tags_to_fetch_refspec(struct remote *remote)
-{
-       refspec_append(&remote->fetch, TAG_REFSPEC);
-}
-
 static void add_url(struct remote *remote, const char *url)
 {
        ALLOC_GROW(remote->url, remote->url_nr + 1, remote->url_alloc);
index e7d00fe2a39c02b310246d83f6adbcfc4b8cb0d3..4ffbc0082de309dd9e3ae506b599d3b8bbdee295 100644 (file)
--- a/remote.h
+++ b/remote.h
@@ -290,6 +290,4 @@ extern int parseopt_push_cas_option(const struct option *, const char *arg, int
 extern int is_empty_cas(const struct push_cas_option *);
 void apply_push_cas(struct push_cas_option *, struct remote *, struct ref *);
 
-void add_prune_tags_to_fetch_refspec(struct remote *remote);
-
 #endif