mirror of
https://github.com/martinvonz/jj.git
synced 2024-12-28 07:20:11 +00:00
ef4cb663ae
This patch moves the function for updating branches after rewrite from `commands.rs` into `rewrite.rs`. It also changes the function to update branches even if they were conflicted or become conflicted. I think that seems better than leaving branches on old commits. For example, let's say you have start with this: ``` C main | B origin@main | A ``` You now pull from origin, which has updated the main branch from B to B'. We apply that change to both the remote branch and the local branch, which results in a conflict in the local branch: ``` C main? | B B' main? origin@main |/ A ``` If you now rewrite C to C', the conflicted main branch will still point to C, which is just weird. This patch changes that so the conflicted side of main gets repointed to C'. I also refactored the code to reuse our existing `MutableRepo::merge_single_ref()`, which improves the behavior in several cases, such as the conflict-resolution case in the last test case. |
||
---|---|---|
.. | ||
test_bad_locking.rs | ||
test_commit_builder.rs | ||
test_commit_concurrent.rs | ||
test_diff_summary.rs | ||
test_evolution.rs | ||
test_git.rs | ||
test_index.rs | ||
test_init.rs | ||
test_load_repo.rs | ||
test_merge_trees.rs | ||
test_mut_repo.rs | ||
test_operations.rs | ||
test_refs.rs | ||
test_revset.rs | ||
test_revset_graph_iterator.rs | ||
test_rewrite.rs | ||
test_view.rs | ||
test_working_copy.rs | ||
test_working_copy_concurrent.rs |