]> git.ipfire.org Git - thirdparty/git.git/commitdiff
replay: expose `replay_result_queue_update()`
authorPatrick Steinhardt <ps@pks.im>
Wed, 1 Jul 2026 11:35:36 +0000 (13:35 +0200)
committerJunio C Hamano <gitster@pobox.com>
Fri, 3 Jul 2026 17:32:47 +0000 (10:32 -0700)
Expose `replay_result_queue_update()`, which is used to append another
reference update to the replay result. This function will be used in a
subsequent commit.

Suggested-by: Christian Couder <christian.couder@gmail.com>
Signed-off-by: Patrick Steinhardt <ps@pks.im>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
replay.c
replay.h

index 4ef8abb607770a69f99600330a0c4a7713f69b0b..7c8433107bbef293afdc977e635f533aa7f6669c 100644 (file)
--- a/replay.c
+++ b/replay.c
@@ -351,10 +351,10 @@ void replay_result_release(struct replay_result *result)
        free(result->updates);
 }
 
-static void replay_result_queue_update(struct replay_result *result,
-                                      const char *refname,
-                                      const struct object_id *old_oid,
-                                      const struct object_id *new_oid)
+void replay_result_queue_update(struct replay_result *result,
+                               const char *refname,
+                               const struct object_id *old_oid,
+                               const struct object_id *new_oid)
 {
        ALLOC_GROW(result->updates, result->updates_nr + 1, result->updates_alloc);
        result->updates[result->updates_nr].refname = xstrdup(refname);
index 1851a07705ab030a61ea651680320237772db02d..da83b65345efe2af5b4cd1a416f6cfe6196d0437 100644 (file)
--- a/replay.h
+++ b/replay.h
@@ -80,6 +80,11 @@ struct replay_result {
 
 void replay_result_release(struct replay_result *result);
 
+void replay_result_queue_update(struct replay_result *result,
+                               const char *refname,
+                               const struct object_id *old_oid,
+                               const struct object_id *new_oid);
+
 /*
  * Replay a set of commits onto a new location. Leaves both the working tree,
  * index and references untouched. Reference updates caused by the replay will