Files
jj-vcs-jj/cli/tests/test_diffedit_command.rs
hexbinoct b4d6348048 copies: keep renames detected against multiple merge parents
When diffing a merge commit, copy and rename detection runs once per
parent, so a file renamed on a path present in several parents yields the
same (source, target) copy record for each of them. `add_records` treated
those duplicates as a target with multiple sources and poisoned both
lookup maps. That dropped the deletion of the source and showed the target
as a plain addition instead of a rename.

Skip a record whose (source, target) pair was already recorded so the
duplicate no longer looks like a conflict. Genuine conflicts, where a
target has two different sources, are still discarded as before.

The existing `test_diffedit_merge` was asserting the buggy output, where a
copy made in a merge commit showed as a plain addition. Its snapshot now
reports the copy, matching what the same edit produces against a single
parent.

Fixes #9752
2026-07-24 06:04:41 +00:00

31 KiB