ok/jj
1
0
Fork 0
forked from mirrors/jj
jj/lib/src
Martin von Zweigbergk 4d42604913 git_backend: write trees involved in conflict in git commit header
We haven't used custom Git commit headers for two main reasons:

1. I don't want commits created by jj to be different from any other
   commits. I don't want Git projects to get annoyed by such commit
   and reject them.

2. I've been concerned that tools don't know how to handle such
   headers, perhaps even resulting in crashes.

The first argument doesn't apply to commits with conflicts because
such commits would never be accepted by a project whether or not they
use custom commit headers. The second argument is less relevant for
conflicted commits because most tools will be confused by such commits
anyway.

Storing conflict information in commit headers means that we can
transfer them via the regular Git wire protocol. We already include
the tree objects nested inside the root-level tree, so they will also
be transferred.

So, let's start by writing the information redundantly to the commit
header and to the existing storage. That way we can roll it back if we
realize there's a problem with using commit headers.
2024-03-10 20:51:05 -07:00
..
default_index revset: introduce more performant way to check if a commit is in a revset 2024-03-11 08:27:35 +05:00
lock perf: add several #[instrument]s 2023-07-28 09:28:01 -07:00
protos op_store: add metadata flag for ops representing working-copy snapshot 2024-02-19 22:44:38 -08:00
backend.rs Nightly clippy fixes 2024-03-02 18:19:14 -08:00
commit.rs sign: Define signing backend API and integrate it 2023-11-30 23:36:56 +02:00
commit_builder.rs Adjust visibility of codependent MutableRepo and CommitBuilder functions 2024-03-02 22:41:47 -05:00
conflicts.rs cli: pass MaterializedTreeValue into git_diff_part() 2023-11-10 04:54:47 -08:00
content_hash.rs Nightly clippy fixes 2024-03-02 18:19:14 -08:00
dag_walk.rs dag_walk: add fallible topo_order_reverse_lazy() 2023-11-14 07:16:39 +09:00
default_submodule_store.rs backends: deduplicate definition of backend names 2023-10-14 06:38:35 -07:00
diff.rs refactor(jj-lib): remove nightly_shims gunk 2023-07-17 18:38:26 -05:00
file_util.rs working_copy: implement symlinks on windows with a helper function 2024-03-05 15:16:38 +08:00
files.rs merge: relax input type of Merge::from_removes_adds() 2023-11-07 17:10:12 +09: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 Make URLs in docs hyperlinks 2024-03-04 16:05:42 -05:00
git.rs cli: list new remote branches during git fetch 2024-02-18 17:36:01 +01:00
git_backend.rs git_backend: write trees involved in conflict in git commit header 2024-03-10 20:51:05 -07:00
gitignore.rs gitignore: make objects chain be more Arc friendly 2024-02-24 15:55:10 +09:00
gpg_signing.rs signing: insert tracing events to command invocation paths 2024-03-05 09:23:15 +09:00
hex_util.rs hex_util: move common_hex_len() from backend module 2024-01-05 10:20:57 +09:00
id_prefix.rs Nightly clippy fixes 2024-03-02 18:19:14 -08:00
index.rs index: fix change id resolution test to not depend on deterministic order 2024-02-14 23:22:23 +09:00
lib.rs Implement a procedural macro to derive the ContentHash trait for structs 2024-02-20 11:29:05 -05:00
local_backend.rs Nightly clippy fixes 2024-03-02 18:19:14 -08:00
local_working_copy.rs repo_path: show more detailed error if filesystem path failed to parse 2024-03-09 11:01:43 +09:00
lock.rs lock: remove byteorder dependency from tests, use fs helper functions 2023-12-23 00:14:17 +09:00
matchers.rs matchers: clean up .walk_to(dir) to yield &RepoPath instead of iterator 2023-11-29 08:41:23 +09:00
merge.rs Implement a procedural macro to derive the ContentHash trait for structs 2024-02-20 11:29:05 -05:00
merged_tree.rs merged_tree: remove canceling terms prior to resolving file-level conflict 2023-12-03 07:44:58 +09:00
object_id.rs Add documentation comments for several types 2024-03-02 15:01:55 -05:00
op_heads_store.rs backend: allow cheap copy of MillisSinceEpoch(i64) 2024-02-25 09:00:56 +09:00
op_store.rs Replace uses of content_hash! with #[derive(ContentHash)] 2024-02-20 14:18:13 -05:00
op_walk.rs operation: add shorthand for .store_operation().metadata 2024-02-25 09:00:56 +09:00
operation.rs Add documentation comments for operation, transaction, and view types 2024-03-02 15:35:41 -05:00
refs.rs lib refs.rs: rename TrackingRefPair to LocalAndRemoteRef 2024-02-07 17:06:28 -08:00
repo.rs Adjust visibility of codependent MutableRepo and CommitBuilder functions 2024-03-02 22:41:47 -05:00
repo_path.rs repo_path: don't panic on invalid UTF-8 path component 2024-03-09 11:01:43 +09:00
revset.pest revset: add parsing rule and expression node dedicated for kind:"pattern" 2024-02-14 10:04:56 +09:00
revset.rs revset: introduce more performant way to check if a commit is in a revset 2024-03-11 08:27:35 +05:00
revset_graph.rs clippy: Fix nightly warnings about "useless use of vec!" 2024-01-25 22:00:26 -08:00
rewrite.rs rewrite: allow working-copy to be abandoned 2024-02-25 16:39:05 -08:00
settings.rs Add configuration options for node symbols in the graphs. 2024-03-09 21:16:58 +01:00
signing.rs sign: Implement SSH signing backend 2024-02-20 00:02:08 +00:00
simple_op_heads_store.rs backends: implement as_any() on OpStore and OpHeadsStore too 2024-01-31 00:15:29 -08:00
simple_op_store.rs Nightly clippy fixes 2024-03-02 18:19:14 -08:00
ssh_signing.rs signing: insert tracing events to command invocation paths 2024-03-05 09:23:15 +09:00
stacked_table.rs index, stacked_table: inline read_u32::<LittleEndian>() 2023-12-23 00:14:17 +09:00
store.rs backend: pass Index and keep_newer timestamp parameters to gc() 2024-01-27 10:18:11 +09:00
str_util.rs cli: parse "git fetch --branch" parameter as string pattern 2023-10-25 03:58:48 +09:00
submodule_store.rs docs: warn about missing docs for jj-lib crate 2023-07-10 18:28:59 +03:00
transaction.rs Store OpHeadsStore in UnpublishedOperation instead of RepoLoader 2024-03-02 23:08:57 -05:00
tree.rs cleanup: remove remaining ": {source}" from error message templates 2024-02-04 09:13:21 +09:00
tree_builder.rs rust: bump MSRV to 1.76.0 2024-02-09 15:48:01 -06:00
view.rs Add documentation comments for operation, transaction, and view types 2024-03-02 15:35:41 -05:00
working_copy.rs fsmonitor: allow core.fsmonitor = "none" to disable 2024-02-20 20:19:47 -06:00
workspace.rs Add documentation comments for several types 2024-03-02 15:01:55 -05:00