ok/jj
1
0
Fork 0
forked from mirrors/jj
jj/lib
Martin von Zweigbergk 10a2a15993 working_copy: don't track conflict-ness in state file, use tree object
The working copy's current tree tracks whether a file is a
conflict. We also track that in the `TreeState` object. That allows us
to not read the trees object to decide if we should try to parse a
file as a conflict.

One disadvantage is that it's redundant information that needs to be
kept in sync with the tree object. Also, for Watchman, we would like
to completely ignore the persisted `FileState`.

This commit removes the `FileType::Conflict` variant and instead
checks in the tree object whether a given path was a conflict. This is
the change I mentioned in dc8a207737. We still skip the check
completely if the file's mtime etc. is unchanged, so it shouldn't have
much effect in the common case of a mostly unchanged working copy. I
measured a slowdown on `jj diff` by ~3% in the Linux repo with a clean
working copy with all mtimes bumped. I think the simpler code and
reduced risk of subtle bugs is worth the performance hit.
2023-07-24 15:02:33 -07:00
..
benches cargo: rename crates from jujutsu/jujutsu-lib to jj-cli/jj-lib 2023-07-09 06:40:43 +02:00
gen-protos backend: split up store.proto in git and local versions 2023-06-22 13:49:46 +02:00
src working_copy: don't track conflict-ness in state file, use tree object 2023-07-24 15:02:33 -07:00
tests revset: extract graph-related types to separate module 2023-07-25 01:45:37 +09:00
testutils cargo: bump the cargo-dependencies group with 3 updates 2023-07-21 15:34:03 +00:00
Cargo.toml revset_graph: add helper to test graph sorting 2023-07-25 01:45:37 +09:00