ok/jj
1
0
Fork 0
forked from mirrors/jj
jj/lib
Yuya Nishihara e7e49527ef git: ensure that remote branches never diverge
I was considering how refs would be imported if we had a per-remote view of
named branches (and tags): Each remote has a view, and jj remembers the last
known view state to compute diffs. That's the same for the pseudo "git" remote.
Under the current storage, these view states are represented as follows:

  git_refs["refs/heads/{name}"]             # pseudo "git" remote branches
  git_refs["refs/tags/{name}"]              # pseudo "git" remote tags
  git_refs["refs/remotes/{remote}/{name}"]  # real remote branches

and the diffs are merged in to branches[name].local_target and tags[name].

We also have branches[name].remote_targets[remote], but I think it's redundant
because a tracking branch should also be the last known state, not something
that can diverge from the actual state. To make that clear, this commit
replaces the use of the "merge" API.
2023-08-09 15:22:45 +09:00
..
benches cargo: rename crates from jujutsu/jujutsu-lib to jj-cli/jj-lib 2023-07-09 06:40:43 +02:00
gen-protos cargo: unify a lot of crate metadata in the workspace 2023-08-06 16:44:33 -05:00
src git: ensure that remote branches never diverge 2023-08-09 15:22:45 +09:00
tests conflicts: move Merge<T> to merge module 2023-08-06 22:08:09 +00:00
testutils cargo: unify a lot of crate metadata in the workspace 2023-08-06 16:44:33 -05:00
Cargo.toml cargo: unify a lot of crate metadata in the workspace 2023-08-06 16:44:33 -05:00