ok/jj
1
0
Fork 0
forked from mirrors/jj
jj/lib
Martin von Zweigbergk 26a554818a git: update our record of Git branches on export
When we export branches to Git, we didn't update our own record of
Git's refs. This frequently led to spurious conflicts in these refs
(e.g. #463). This is typically what happened:

 1. Import a branch pointing to commit A from Git
 2. Modify the branch in jj to point to commit B
 3. Export the branch to Git
 4. Update the branch in Git to point to commit C
 5. Import refs from Git

In step 3, we forgot to update our record of the branch in the repo
view's `git_refs` field. That led to the import in step 5 to think
that the branch moved from A to C in Git, which conflicts with the
internal branch target of B.

This commit fixes the bug by updating the refs in the `MutableRepo`.

Closes #463.
2022-11-13 15:06:10 -08:00
..
src git: update our record of Git branches on export 2022-11-13 15:06:10 -08:00
tests git: update our record of Git branches on export 2022-11-13 15:06:10 -08:00
testutils tests: move testutils module into separate crate 2022-11-08 07:29:35 -08:00
build.rs cleanup: remove extern crate declarations 2022-09-21 22:24:09 -07:00
Cargo.toml simple_op_store: replace Protobuf by Thrift 2022-11-13 11:39:33 -08:00