aboutsummaryrefslogtreecommitdiffstats
path: root/refs.h
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2025-08-21 13:46:58 -0700
committerJunio C Hamano <gitster@pobox.com>2025-08-21 13:46:58 -0700
commit9a85fa8406d6281dfcc3caa1e3d3828a5f73a363 (patch)
treea56e9b1c13f83c3d45936cf89b9a9c499d862d66 /refs.h
parentc3c8b6910a7cd3d5a25522d3fd6925083048be24 (diff)
parent16c4fa26b99e6f6c24dc93575ffa884c13b1fe5f (diff)
downloadgit-9a85fa8406d6281dfcc3caa1e3d3828a5f73a363.tar.gz
Merge branch 'ps/remote-rename-fix'
"git remote rename origin upstream" failed to move origin/HEAD to upstream/HEAD when origin/HEAD is unborn and performed other renames extremely inefficiently, which has been corrected. * ps/remote-rename-fix: builtin/remote: only iterate through refs that are to be renamed builtin/remote: rework how remote refs get renamed builtin/remote: determine whether refs need renaming early on builtin/remote: fix sign comparison warnings refs: simplify logic when migrating reflog entries refs: pass refname when invoking reflog entry callback
Diffstat (limited to 'refs.h')
-rw-r--r--refs.h13
1 files changed, 9 insertions, 4 deletions
diff --git a/refs.h b/refs.h
index a540aa5e1b..f29e486e33 100644
--- a/refs.h
+++ b/refs.h
@@ -428,6 +428,8 @@ int refs_for_each_namespaced_ref(struct ref_store *refs,
/* can be used to learn about broken ref and symref */
int refs_for_each_rawref(struct ref_store *refs, each_ref_fn fn, void *cb_data);
+int refs_for_each_rawref_in(struct ref_store *refs, const char *prefix,
+ each_ref_fn fn, void *cb_data);
/*
* Iterates over all refs including root refs, i.e. pseudorefs and HEAD.
@@ -558,10 +560,13 @@ int refs_delete_reflog(struct ref_store *refs, const char *refname);
* The cb_data is a caller-supplied pointer given to the iterator
* functions.
*/
-typedef int each_reflog_ent_fn(
- struct object_id *old_oid, struct object_id *new_oid,
- const char *committer, timestamp_t timestamp,
- int tz, const char *msg, void *cb_data);
+typedef int each_reflog_ent_fn(const char *refname,
+ struct object_id *old_oid,
+ struct object_id *new_oid,
+ const char *committer,
+ timestamp_t timestamp,
+ int tz, const char *msg,
+ void *cb_data);
/* Iterate over reflog entries in the log for `refname`. */