aboutsummaryrefslogtreecommitdiff
path: root/builtin/remote.c
diff options
context:
space:
mode:
authorPatrick Steinhardt <ps@pks.im>2026-02-23 12:59:47 +0100
committerJunio C Hamano <gitster@pobox.com>2026-02-23 13:21:19 -0800
commit5ef6d593f18ac6b1e7540eed45f5d795d5a82faa (patch)
treec4bfdda9f17e3d4c7bb80206a962c9f59b3c5e56 /builtin/remote.c
parent67034081adc956c4dc8b51f59a9b70b8861c4642 (diff)
downloadgit-5ef6d593f18ac6b1e7540eed45f5d795d5a82faa.tar.xz
refs: replace `refs_for_each_rawref_in()`
Replace calls to `refs_for_each_rawref_in()` with the newly introduced `refs_for_each_ref_ext()` function. Signed-off-by: Patrick Steinhardt <ps@pks.im> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin/remote.c')
-rw-r--r--builtin/remote.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/builtin/remote.c b/builtin/remote.c
index ace390c671..0fddaa1773 100644
--- a/builtin/remote.c
+++ b/builtin/remote.c
@@ -912,6 +912,9 @@ static int mv(int argc, const char **argv, const char *prefix,
old_remote_context.buf);
if (refspecs_need_update) {
+ struct refs_for_each_ref_options opts = {
+ .flags = REFS_FOR_EACH_INCLUDE_BROKEN,
+ };
rename.transaction = ref_store_transaction_begin(get_main_ref_store(the_repository),
0, &err);
if (!rename.transaction)
@@ -923,9 +926,10 @@ static int mv(int argc, const char **argv, const char *prefix,
strbuf_reset(&buf);
strbuf_addf(&buf, "refs/remotes/%s/", rename.old_name);
+ opts.prefix = buf.buf;
- result = refs_for_each_rawref_in(get_main_ref_store(the_repository), buf.buf,
- rename_one_ref, &rename);
+ result = refs_for_each_ref_ext(get_main_ref_store(the_repository),
+ rename_one_ref, &rename, &opts);
if (result < 0)
die(_("queueing remote ref renames failed: %s"), rename.err->buf);