ok/jj
1
0
Fork 0
forked from mirrors/jj
jj/lib
Yuya Nishihara 57167cefda git: on import_refs(), don't abandon ancestors of newly fetched refs
I made import_refs() not preserve commits referenced by remote branches at
520f692a46 "git: on import_refs(), don't preserve old branches referenced by
remote refs." The idea is that remote branches are weak, and commits referenced
by these refs can be freely rewritten by future local changes without moving
the refs. I don't think that's wrong, but 520f692a46 also made "new" remote
changes be abandoned by old remote refs. This problem occurs only when
git.auto-local-branch is off.

I think there are two ways to fix the problem:
 a. pin non-tracking remote branches just like local refs
 b. pin newly fetched refs in addition to local refs
This patch implements (b) because it's simpler and more obvious that the
fetched commits would never be abandoned immediately.
2023-10-17 14:49:49 +09:00
..
benches
gen-protos
src git: on import_refs(), don't abandon ancestors of newly fetched refs 2023-10-17 14:49:49 +09:00
tests git: on import_refs(), don't abandon ancestors of newly fetched refs 2023-10-17 14:49:49 +09:00
testutils working copy: pass commit instead of tree into check_out() 2023-10-16 22:33:44 -07:00
Cargo.toml backend: make read functions async 2023-10-08 23:36:49 -07:00
LICENSE