Skip to content

Commit 9530350

Browse files
bmwillgitster
authored andcommitted
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 <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent e5349ab commit 9530350

File tree

3 files changed

+1
-8
lines changed

3 files changed

+1
-8
lines changed

builtin/fetch.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1392,7 +1392,7 @@ static int fetch_one(struct remote *remote, int argc, const char **argv, int pru
13921392

13931393
maybe_prune_tags = prune_tags_ok && prune_tags;
13941394
if (maybe_prune_tags && remote_via_config)
1395-
add_prune_tags_to_fetch_refspec(remote);
1395+
refspec_append(&remote->fetch, TAG_REFSPEC);
13961396

13971397
if (argc > 0 || (maybe_prune_tags && !remote_via_config)) {
13981398
size_t nr_alloc = st_add3(argc, maybe_prune_tags, 1);

remote.c

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -77,11 +77,6 @@ static const char *alias_url(const char *url, struct rewrites *r)
7777
return xstrfmt("%s%s", r->rewrite[longest_i]->base, url + longest->len);
7878
}
7979

80-
void add_prune_tags_to_fetch_refspec(struct remote *remote)
81-
{
82-
refspec_append(&remote->fetch, TAG_REFSPEC);
83-
}
84-
8580
static void add_url(struct remote *remote, const char *url)
8681
{
8782
ALLOC_GROW(remote->url, remote->url_nr + 1, remote->url_alloc);

remote.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -290,6 +290,4 @@ extern int parseopt_push_cas_option(const struct option *, const char *arg, int
290290
extern int is_empty_cas(const struct push_cas_option *);
291291
void apply_push_cas(struct push_cas_option *, struct remote *, struct ref *);
292292

293-
void add_prune_tags_to_fetch_refspec(struct remote *remote);
294-
295293
#endif

0 commit comments

Comments
 (0)