ok/jj
1
0
Fork 0
forked from mirrors/jj
jj/lib
Yuya Nishihara a697175674 view: add tracking state to RemoteRef
The state field isn't saved yet. git import/export code paths are migrated,
but new tracking state is always calculated based on git.auto-local-branch
setting. So the tracking state is effectively a global flag.

As we don't know whether the existing remote branches have been merged in to
local branches, we assume that remote branches are "tracking" so long as the
local counterparts exist. This means existing locally-deleted branch won't
be pushed without re-tracking it. I think it's rare to leave locally-deleted
branches for long. For "git.auto-local-branch = false" setup, users might have
to untrack branches if they've manually "merged" remote branches and want to
continue that workflow. I considered using git.auto-local-branch setting in the
migration path, but I don't think that would give a better result. The setting
may be toggled after the branches got merged, and I'm planning to change it
default off for better Git interop.

Implementation-wise, the state enum can be a simple bool. It's enum just
because I originally considered to pack "forgotten" concept into it. I have
no idea which will be better for future extension.
2023-10-16 23:21:05 +09:00
..
benches
gen-protos
src view: add tracking state to RemoteRef 2023-10-16 23:21:05 +09:00
tests view: add tracking state to RemoteRef 2023-10-16 23:21:05 +09:00
testutils working copy: return Box<dyn LockedWorkingCopy> from start_mutation() 2023-10-15 16:13:19 -07:00
Cargo.toml backend: make read functions async 2023-10-08 23:36:49 -07:00
LICENSE cargo: add LICENSE file to each crate we publish 2023-09-22 21:48:28 -07:00