jj/lib
Martin von Zweigbergk 6b1ccd4512 view: add support for merging git ref targets
When there are two concurrent operations, we would resolve conflicting
updates of git refs quite arbitrarily before this change. This change
introduces a new `refs` module with a function for doing a 3-way merge
of ref targets. For example, if both sides moved a ref forward but by
different amounts, we pick the descendant-most target. If we can't
resolve it, we leave it as a conflict. That's fine to do for git refs
because they can be resolved by simply running `jj git refresh` to
import refs again (the underlying git repo is the source of truth).

As with the previous change, I'm doing this now because mostly because
it is a good stepping stone towards branch support (issue #21). We'll
soon use the same 3-way merging for updating the local branch
definition (once we add that) when a branch changes in the git repo or
on a remote.
2021-07-24 19:01:56 -07:00
..
benches project: rename project from Jujube to Jujutsu 2021-05-15 10:28:40 -07:00
protos view: add support for conflicting git refs in the model 2021-07-24 19:01:56 -07:00
src view: add support for merging git ref targets 2021-07-24 19:01:56 -07:00
tests view: add support for merging git ref targets 2021-07-24 19:01:56 -07:00
build.rs
Cargo.toml cargo: update test-case to 1.2.0 now that frondeus/test-case#66 is fixed 2021-06-28 12:13:14 -07:00