aboutsummaryrefslogtreecommitdiffstats
path: root/builtin/remote.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2025-07-16 09:42:26 -0700
committerJunio C Hamano <gitster@pobox.com>2025-07-16 09:42:27 -0700
commit7b625c2a3511ac89acd14ae4bcbbc471bd50cdbb (patch)
tree30a8a15086959ebd9bc32ebc7bdd6c30b6e6e574 /builtin/remote.c
parent32571a0222eb85ef265e136f27e44c302302b45c (diff)
parent87d8d8c5d09b1ee52cdf472b53b370020a7cb41c (diff)
downloadgit-7b625c2a3511ac89acd14ae4bcbbc471bd50cdbb.tar.gz
Merge branch 'ph/fetch-prune-optim'
"git fetch --prune" used to be O(n^2) expensive when there are many refs, which has been corrected. * ph/fetch-prune-optim: clean up interface for refs_warn_dangling_symrefs refs: remove old refs_warn_dangling_symref fetch-prune: optimize dangling-ref reporting
Diffstat (limited to 'builtin/remote.c')
-rw-r--r--builtin/remote.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/builtin/remote.c b/builtin/remote.c
index 7cbda285eb..18843b6bf6 100644
--- a/builtin/remote.c
+++ b/builtin/remote.c
@@ -1521,9 +1521,6 @@ static int prune_remote(const char *remote, int dry_run)
struct ref_states states = REF_STATES_INIT;
struct string_list refs_to_prune = STRING_LIST_INIT_NODUP;
struct string_list_item *item;
- const char *dangling_msg = dry_run
- ? _(" %s will become dangling!")
- : _(" %s has become dangling!");
get_remote_ref_states(remote, &states, GET_REF_STATES);
@@ -1555,7 +1552,7 @@ static int prune_remote(const char *remote, int dry_run)
}
refs_warn_dangling_symrefs(get_main_ref_store(the_repository),
- stdout, dangling_msg, &refs_to_prune);
+ stdout, " ", dry_run, &refs_to_prune);
string_list_clear(&refs_to_prune, 0);
free_remote_ref_states(&states);