]> git.ipfire.org Git - thirdparty/git.git/commit
builtin/replay: extract core logic to replay revisions
authorPatrick Steinhardt <ps@pks.im>
Wed, 7 Jan 2026 10:10:09 +0000 (11:10 +0100)
committerJunio C Hamano <gitster@pobox.com>
Thu, 8 Jan 2026 02:01:58 +0000 (11:01 +0900)
commit3b7ea08b3f2f2a33c16e275ffe358f6358eb9c66
tree25714de299c1be9f9a86c166f2b41631c26e7e79
parentf42d7c9067f0f599fa6c0e94a3d247c19b5a6d7a
builtin/replay: extract core logic to replay revisions

We're about to move the core logic used to replay revisions onto a new
base into the "libgit.a" library. Prepare for this by pulling out the
logic into a new function `replay_revisions()` that:

  1. Takes a set of revisions to replay and some options that tell it how
     it ought to replay the revisions.

  2. Replays the commits.

  3. Records any reference updates that would be caused by replaying the
     commits in a structure that is owned by the caller.

The logic itself will be moved into a separate file in the next commit.
This change is not expected to cause user-visible change in behaviour.

Signed-off-by: Patrick Steinhardt <ps@pks.im>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin/replay.c