replay: stop assuming replayed branches do not diverge
commite928c11e29966b0a8f4340465b8238501c994eb1
authorElijah Newren <newren@gmail.com>
Fri, 24 Nov 2023 11:10:43 +0000 (24 12:10 +0100)
committerJunio C Hamano <gitster@pobox.com>
Sun, 26 Nov 2023 01:10:50 +0000 (26 10:10 +0900)
tree301bcdef30bd3d35a896079ae5f8952282bdeadd
parentc4611130f47242af19fbd8eca2be039742c122b1
replay: stop assuming replayed branches do not diverge

The replay command is able to replay multiple branches but when some of
them are based on other replayed branches, their commit should be
replayed onto already replayed commits.

For this purpose, let's store the replayed commit and its original
commit in a key value store, so that we can easily find and reuse a
replayed commit instead of the original one.

Co-authored-by: Christian Couder <chriscool@tuxfamily.org>
Signed-off-by: Elijah Newren <newren@gmail.com>
Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin/replay.c
t/t3650-replay-basics.sh