[PATCH 0/3] Teach git-replay(1) to linearize merge commits
- From
Toon Claes <toon@iotcl.com>
- Date
- Jun 8, 2026, 18:37 UTC
- Message-ID
- <20260608-toon-git-replay-drop-merges-v1-0-e3ee71fce7b4@iotcl.com>
As an alternative to dscho's patch series to replay merges[1], add option to git-replay(1) to linearize merges. This mimics wath git-rebase(1) does too with --no-rebase-merges (the default).
The first two patches do some refactoring. The third patch implements the actual change. I was kindly helped by dscho to implement this change.
The --linearize option is only added to git-replay(1) and not to git-history(1) because in my opinion doesn't make much sense to do so, but I'm happy to hear if anyone disagrees.
This series might conflict with Kristoffer's series to make documentation changes[2], but should be trivial to resolve. And I don't think there's a conflict with Patrick's series on adding "drop" to git-history(1)[3].
dscho's series to replay merges[1] need a bit of rework to fit on top of this, but I'm happy to help figuring that out.
[1]: <pull.2106.git.1778107405.gitgitgadget@gmail.com> [2]: <V2_CV_doc_replay_config.767@msgid.xyz> [3]: <20260603-b4-pks-history-drop-v2-0-742cb5b5176d@pks.im>
Signed-off-by: Toon Claes <toon@iotcl.com>
---
Johannes Schindelin (1):
replay: offer an option to linearize the commit topologyToon Claes (2):
replay: refactor enum replay_mode into a bool
replay: add helper to put entry into mapped_commitsDocumentation/git-replay.adoc | 5 ++ builtin/replay.c | 4 ++ replay.c | 109 +++++++++++++++++++++++------------------- replay.h | 5 ++ t/t3650-replay-basics.sh | 22 +++++++++ 5 files changed, 97 insertions(+), 48 deletions(-)
--- base-commit: 9ac3f193c05c2237e2b14ebaa1149e9fc8a1abe0 change-id: 20260604-toon-git-replay-drop-merges-807fa008d395