mirror of
https://github.com/martinvonz/jj.git
synced 2025-01-15 16:53:25 +00:00
9d4a97381f
Let's say we're updating one parent of a merge: ``` E E' /|\ /|\ B C D -> B C D' \|/ \|/ A A ``` When rebasing `E` to create `E'` there, we do that by merging the changes compared to the auto-merged parents. The auto-merged parents before is `B+(C-A)+(D-A)`, and after it's `B+(C-A)+(D'-A)`. Then we rebase the diff, which gives us `E' = B+(C-A)+(D'-A) + (E - (B+(C-A)+(D-A))) = D' + (E - D')`. However, we currently don't do quite that simplification because we first resolve conflicts when possible in the two auto-merged parent trees (before and after). That rarely makes a difference to the result, but it's wasteful to do it. It does make a difference in some cases where our merge algorithm is lossy, which currently is only the "A+(A-B)=A" case. I added a test case showing where it does make a difference. It's a non-obvious cases but I think the new behavior is more correct (the old behavior was a conflict). |
||
---|---|---|
.. | ||
runner.rs | ||
test_bad_locking.rs | ||
test_commit_builder.rs | ||
test_commit_concurrent.rs | ||
test_conflicts.rs | ||
test_default_revset_graph_iterator.rs | ||
test_git.rs | ||
test_git_backend.rs | ||
test_gpg.rs | ||
test_id_prefix.rs | ||
test_index.rs | ||
test_init.rs | ||
test_load_repo.rs | ||
test_local_working_copy.rs | ||
test_local_working_copy_concurrent.rs | ||
test_local_working_copy_sparse.rs | ||
test_merge_trees.rs | ||
test_merged_tree.rs | ||
test_mut_repo.rs | ||
test_operations.rs | ||
test_refs.rs | ||
test_revset.rs | ||
test_rewrite.rs | ||
test_rewrite_transform.rs | ||
test_signing.rs | ||
test_ssh_signing.rs | ||
test_view.rs | ||
test_workspace.rs |