jj/lib/src
Scott Taylor 3fe784d50c git_backend: use first tree as base tree for conflicts
Currently, checking out a commit with conflicts in a colocated workspace
causes many editors to show all existing files as added since they
aren't present in the Git HEAD commit. Using the tree of the first side
of the commit as a base tree and then adding the '.jjconflict-*' trees
on top of it would cause any files identical to the first tree to show
as unchanged, matching Git's conflict behavior.

One potential downside to this change is that it becomes harder for a
user to notice if they incorrectly check out a conflicted commit using
`git switch`, since previously all of their files would've disappeared
so it would be more difficult to ignore. However, I think this could be
solved a different way, such as by adding a warning when snapshotting if
'.jjconflict' files are detected. Keeping the files from the first
tree also has the benefit that '.gitignore' files will still be present,
meaning that when a user does `jj abandon` to recover, it won't delete
their ignored files.

Using 'JJ-CONFLICT-README' as the name for the readme file instead of
'README' makes it more clear that this file is related to the
'.jjconflict-*' trees, since now the repo's actual README file might be
present as well in the tree.
2025-12-21 21:37:14 -06:00
..
config config: Add "exec-bit-change" setting for overriding policy on Unix 2025-12-04 17:32:40 +00:00
default_index revset_engine: move match_lines() onto StringPattern for reuse 2025-12-18 06:31:37 +00:00
diff_presentation conflicts: propagate conflict labels down to materialization functions 2025-12-12 04:29:59 +00:00
lock lock: don't emit "locked" message on retry 2025-12-12 01:39:30 +00:00
protos protos: add conflict labels to working copy and simple backend 2025-12-09 14:23:43 +00:00
absorb.rs conflicts: propagate conflict labels down to materialization functions 2025-12-12 04:29:59 +00:00
annotate.rs conflicts: propagate conflict labels down to materialization functions 2025-12-12 04:29:59 +00:00
backend.rs backend: add conflict labels to Commit 2025-12-09 14:23:43 +00:00
bisect.rs bisect: Make bisect able to search for first good/bad revision in the range 2025-10-01 22:24:32 +00:00
commit.rs rewrite: add conflict labels for rebased commits 2025-12-20 04:03:57 +00:00
commit_builder.rs backend: add conflict labels to Commit 2025-12-09 14:23:43 +00:00
config.rs docs: jj-vcs.github.io -> jj-vcs.dev 2025-11-26 00:36:39 +00:00
config_resolver.rs tests: update cargo insta snapshots 2025-12-09 18:59:34 +00:00
conflict_labels.rs merged_tree: retain conflict labels in MergedTree::resolve 2025-12-09 14:23:43 +00:00
conflicts.rs conflicts: show "noeol" state separately for each side of a diff 2025-12-20 17:43:41 +00:00
content_hash.rs content_hash: implement ContentHash for tuples up to 4 items 2025-07-07 08:17:18 +00:00
copies.rs repo_path: use Diff<T> to specify copied source/target paths 2025-12-18 06:28:01 +00:00
dag_walk.rs dag_walk: avoid using unwrap() to strip off infallible error 2025-10-27 15:17:34 +00:00
default_submodule_store.rs cleanup: replace clippy allow() exemptions by expect() 2025-09-13 04:42:02 +00:00
diff.rs cleanup: remove redundant + use<'_> after migrating to 2024 edition 2025-10-25 02:09:31 +00:00
dsl_util.rs template: Fail on unexpected keyword arguments 2025-11-13 05:15:40 +00:00
eol.rs local_working_copy: remove Default from TreeStateSettings 2025-09-14 03:55:09 +00:00
evolution.rs index: make Index::has_id fallible 2025-10-25 18:05:13 +00:00
extensions_map.rs cleanup: replace clippy allow() exemptions by expect() 2025-09-13 04:42:02 +00:00
file_util.rs file_util: add is_empty_dir() helper 2025-12-09 13:43:24 +00:00
files.rs merge: implement IntoIterator for references of Merge<T> 2025-12-09 23:28:23 +00:00
fileset.pest fileset, revset: settle on optionally-quoted pattern syntax 2025-03-11 08:35:27 +00:00
fileset.rs fileset: enable glob matching by default 2025-11-12 11:27:41 +00:00
fileset_parser.rs fileset, revset: do not omit parentheses from expression span 2025-10-18 02:45:42 +00:00
fix.rs lib: replace MergedTreeId with MergedTree and Merge<TreeId> 2025-11-08 14:06:58 +00:00
fmt_util.rs settings: support human-readable byte sizes for max-new-file-size 2023-08-17 19:29:38 -07:00
fsmonitor.rs local_working_copy: remove Default from TreeStateSettings 2025-09-14 03:55:09 +00:00
git.rs colocation: use gix for toggling core.bare config 2025-12-13 04:28:31 +00:00
git_backend.rs git_backend: use first tree as base tree for conflicts 2025-12-21 21:37:14 -06:00
git_subprocess.rs cleanup: correct backtick usage in documentation comments 2025-12-04 21:42:30 +00:00
gitignore.rs clippy: nightly clippy fixes (more Self) 2025-10-21 02:00:14 +00:00
gpg_signing.rs clippy: enable unnecessary_literal_bound lint 2025-12-05 17:07:44 +00:00
graph.rs cleanup: replace clippy allow() exemptions by expect() 2025-09-13 04:42:02 +00:00
hex_util.rs cleanup: use .as_chunks() instead of chunks_exact() 2025-09-19 09:41:32 +00:00
id_prefix.rs index: add ResolvedChangeTargets to return all commits with change ID 2025-12-16 02:02:31 +00:00
index.rs index: add ResolvedChangeTargets to return all commits with change ID 2025-12-16 02:02:31 +00:00
iter_util.rs index: make Index::is_ancestor fallible 2025-10-28 13:47:44 +00:00
lib.rs lib: add ConflictLabels type to store conflict labels 2025-12-09 14:23:43 +00:00
local_working_copy.rs watchman: don't start a new tokio runtime if there already is one 2025-12-17 17:31:07 +00:00
matchers.rs matchers: move RepoPathTree to repo_path module 2025-12-06 16:27:21 +00:00
merge.rs repo_path: use stringified paths when formatting copied path 2025-12-18 06:28:01 +00:00
merged_tree.rs merged_tree: add conflicts_matching() method 2025-12-12 04:29:59 +00:00
object_id.rs index: add ResolvedChangeTargets to return all commits with change ID 2025-12-16 02:02:31 +00:00
op_heads_store.rs op_heads_store: convert OpHeadsStore trait to be async 2025-10-19 05:58:09 +00:00
op_store.rs op_store: convert OpStore trait to be async 2025-10-19 05:46:00 +00:00
op_walk.rs op_heads_store: convert OpHeadsStore trait to be async 2025-10-19 05:58:09 +00:00
operation.rs cleanup: remove redundant + use<'_> after migrating to 2024 edition 2025-10-25 02:09:31 +00:00
ref_name.rs cli, lib: move to Rust 2024 language edition 2025-07-28 17:05:41 +00:00
refs.rs index: make Index::is_ancestor fallible 2025-10-28 13:47:44 +00:00
repo.rs index: add ResolvedChangeTargets to return all commits with change ID 2025-12-16 02:02:31 +00:00
repo_path.rs repo_path: use stringified paths when formatting copied path 2025-12-18 06:28:01 +00:00
revset.pest revset: restore parsing rule for expression without "modifier:" syntax 2025-11-23 03:00:12 +00:00
revset.rs command_error: use offset in hint for divergent changes 2025-12-16 02:02:31 +00:00
revset_parser.rs revset: restore parsing rule for expression without "modifier:" syntax 2025-11-23 03:00:12 +00:00
rewrite.rs rewrite: add conflict labels for rebased commits 2025-12-20 04:03:57 +00:00
secret_backend.rs cleanup: leverage trait upcasting, delete as_any*() 2025-09-20 01:22:47 +00:00
settings.rs settings: parse auto-track-bookmarks as string matcher expressions 2025-12-10 11:23:58 +00:00
signing.rs cli lib: make use of Self consistent 2025-07-27 00:12:02 +00:00
simple_backend.rs protos: add conflict labels to working copy and simple backend 2025-12-09 14:23:43 +00:00
simple_op_heads_store.rs op_heads_store: convert OpHeadsStore trait to be async 2025-10-19 05:58:09 +00:00
simple_op_store.rs op_store: convert OpStore trait to be async 2025-10-19 05:46:00 +00:00
ssh_signing.rs clippy: enable unnecessary_literal_bound lint 2025-12-05 17:07:44 +00:00
stacked_table.rs stacked_table: add gc() function to prune unreachable table segments 2025-12-17 10:38:11 +00:00
store.rs lib: replace MergedTreeId with MergedTree and Merge<TreeId> 2025-11-08 14:06:58 +00:00
str_util.rs revset_engine: move match_lines() onto StringPattern for reuse 2025-12-18 06:31:37 +00:00
submodule_store.rs cleanup: replace clippy allow() exemptions by expect() 2025-09-13 04:42:02 +00:00
test_signing_backend.rs clippy: enable unnecessary_literal_bound lint 2025-12-05 17:07:44 +00:00
time_util.rs cli touch: add flag for changing author date 2025-08-26 19:02:31 +00:00
trailer.rs cleanup: replace clippy allow() exemptions by expect() 2025-09-13 04:42:02 +00:00
transaction.rs index: unify IndexStore errors into IndexStoreError enum 2025-10-23 02:07:08 +00:00
tree.rs cleanup: replace clippy allow() exemptions by expect() 2025-09-13 04:42:02 +00:00
tree_builder.rs cleanup: replace clippy allow() exemptions by expect() 2025-09-13 04:42:02 +00:00
tree_merge.rs merge: implement IntoIterator for references of Merge<T> 2025-12-09 23:28:23 +00:00
union_find.rs cli, lib: move to Rust 2024 language edition 2025-07-28 17:05:41 +00:00
view.rs cli: show warnings for unmatched exact bookmark/tag patterns to list 2025-11-26 14:46:17 +00:00
working_copy.rs merged_tree: add conflict labels to MergedTree 2025-12-09 14:23:43 +00:00
workspace.rs rustc_lint: enable let_underscore_drop lint 2025-12-11 13:52:14 +00:00