[PATCH v7 09/11] replay: expose `replay_result_queue_update()`
- From
Patrick Steinhardt <ps@pks.im>
- Date
- Jun 29, 2026, 07:34 UTC
- Message-ID
- <20260629-b4-pks-history-drop-v7-9-6e9392a957d8@pks.im>
- In-Reply-To
- <20260629-b4-pks-history-drop-v7-0-6e9392a957d8@pks.im>
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> --- replay.c | 8 ++++---- replay.h | 5 +++++ 2 files changed, 9 insertions(+), 4 deletions(-)
diff --git a/replay.c b/replay.c index 4ef8abb607..7c8433107b 100644 --- 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); diff --git a/replay.h b/replay.h index 1851a07705..da83b65345 100644 --- 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
-- 2.55.0.rc2.803.g1fd1e6609c.dirty