replay: expose `replay_result_queue_update()`

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>

Patrick Steinhardt committed Jul 1, 2026 at 13:35 UTC 27717e2069fb524dab27ff2335aa4e69f35786a4
2 files changed +9 -4
replay.c
+4 -4
@@ -351,10 +351,10 @@ void replay_result_release(struct replay_result *result)
351 free(result->updates);
352 }
353
354 -static void replay_result_queue_update(struct replay_result *result,
355 - const char *refname,
356 - const struct object_id *old_oid,
357 - const struct object_id *new_oid)
354 +void replay_result_queue_update(struct replay_result *result,
355 + const char *refname,
356 + const struct object_id *old_oid,
357 + const struct object_id *new_oid)
358 {
359 ALLOC_GROW(result->updates, result->updates_nr + 1, result->updates_alloc);
360 result->updates[result->updates_nr].refname = xstrdup(refname);
replay.h
+5
@@ -80,6 +80,11 @@ struct replay_result {
80
81 void replay_result_release(struct replay_result *result);
82
83 +void replay_result_queue_update(struct replay_result *result,
84 + const char *refname,
85 + const struct object_id *old_oid,
86 + const struct object_id *new_oid);
87 +
88 /*
89 * Replay a set of commits onto a new location. Leaves both the working tree,
90 * index and references untouched. Reference updates caused by the replay will