Skip to content

Commit e5b71bf

Browse files
committed
history.adoc: describe merge-replay support and its limits
Replace the blanket "does not (yet) work with histories that contain merges" caveat now that 2-parent merges are supported via the R/O/N algorithm. Spell out what works (the user's manual conflict resolution and any semantic edits inside the merge are preserved through the replay), what is intentionally out of scope (octopus merges; symbol-level extrapolation when rewriting parents pulls in genuinely new content), and what still requires interactive rebase (merges that would actually conflict on replay). Assisted-by: Claude Opus 4.7 Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
1 parent cf3a28f commit e5b71bf

1 file changed

Lines changed: 20 additions & 7 deletions

File tree

Documentation/git-history.adoc

Lines changed: 20 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -40,13 +40,26 @@ at once.
4040
LIMITATIONS
4141
-----------
4242

43-
This command does not (yet) work with histories that contain merges. You
44-
should use linkgit:git-rebase[1] with the `--rebase-merges` flag instead.
45-
46-
Furthermore, the command does not support operations that can result in merge
47-
conflicts. This limitation is by design as history rewrites are not intended to
48-
be stateful operations. The limitation can be lifted once (if) Git learns about
49-
first-class conflicts.
43+
This command supports two-parent merge commits in the rewrite path:
44+
the auto-remerged tree of the original parents, the merge commit
45+
itself, and the auto-merged tree of the rewritten parents are
46+
combined so that the user's manual conflict resolution (textual or
47+
semantic) is preserved through the replay. Octopus merges (more than
48+
two parents) are not supported and are rejected with an error.
49+
50+
The replay propagates the textual diffs the user actually made in
51+
the merge commit. It does _not_ extrapolate symbol-level intent: if
52+
rewriting the parents pulls in genuinely new content (for example, a
53+
new caller of a function that the merge renamed), that new content
54+
is _not_ rewritten by the replay and may need a follow-up edit.
55+
Symbol-aware refactoring is out of scope here, just as it is for
56+
plain rebase.
57+
58+
The command does not support operations that can result in merge
59+
conflicts on the replayed merge itself. This limitation is by design
60+
as history rewrites are not intended to be stateful operations. Use
61+
linkgit:git-rebase[1] with the `--rebase-merges` flag when the
62+
rewrite is expected to require interactive conflict resolution.
5063

5164
COMMANDS
5265
--------

0 commit comments

Comments
 (0)