ok/jj
1
0
Fork 0
forked from mirrors/jj
jj/lib/tests
Martin von Zweigbergk 0108673087 backend: let each backend handle root commit on write
This moves the logic for handling the root commit when writing commits
from `CommitBuilder` into the individual backends. It always bothered
me a bit that the `commit::Commit` wrapper had a different idea of the
number of parents than the wrapped `backend::Commit` had.

With this change, the `LocalBackend` will now write the root commit in
the list of parents if it's there in the argument to
`write_commit()`. Note that root commit itself won't be written. The
main argument for not writing it is that we can then keep the fake
all-zeros hash for it. One argument for writing it, if we were to do
so, is that it would make the set of written objects consistent, so
any future processing of them (such as GC) doesn't have to know to
ignore the root commit in the list of parents.

We still treat the two backends the same, so the user won't be allowed
to create merges including the root commit even when using the
`LocalBackend`.
2022-09-20 21:20:57 -07:00
..
test_bad_locking.rs tests: do not use TempDir::into_path() which would persist the directory 2022-09-07 23:49:46 +09:00
test_commit_builder.rs backend: let each backend handle root commit on write 2022-09-20 21:20:57 -07:00
test_commit_concurrent.rs tests: move init_{repo,workspace} functions onto types 2022-05-21 22:33:16 -07:00
test_conflicts.rs conflicts: change diff line marker to %%%%%%% 2022-09-20 15:26:29 +09:00
test_diff_summary.rs tests: remove &UserSettings argument from TestRepo::init() 2022-05-21 22:33:16 -07:00
test_git.rs spelling: commit 2022-09-09 11:58:37 -07:00
test_index.rs tests: remove &UserSettings argument from TestRepo::init() 2022-05-21 22:33:16 -07:00
test_init.rs backend: let each backend handle root commit on write 2022-09-20 21:20:57 -07:00
test_load_repo.rs tests: remove &UserSettings argument from TestRepo::init() 2022-05-21 22:33:16 -07:00
test_merge_trees.rs backend: let each backend handle root commit on write 2022-09-20 21:20:57 -07:00
test_mut_repo.rs cleanup: rename checkout to wc_commit 2022-09-18 16:19:58 -07:00
test_operations.rs CommitBuilder: remove unneeded store arguments 2022-07-06 07:21:57 -07:00
test_refs.rs tests: move init_{repo,workspace} functions onto types 2022-05-21 22:33:16 -07:00
test_revset.rs backend: let each backend handle root commit on write 2022-09-20 21:20:57 -07:00
test_revset_graph_iterator.rs tests: remove &UserSettings argument from TestRepo::init() 2022-05-21 22:33:16 -07:00
test_rewrite.rs backend: let each backend handle root commit on write 2022-09-20 21:20:57 -07:00
test_view.rs cleanup: rename checkout to wc_commit 2022-09-18 16:19:58 -07:00
test_working_copy.rs cleanup: rename checkout to wc_commit 2022-09-18 16:19:58 -07:00
test_working_copy_concurrent.rs cleanup: rename checkout to wc_commit 2022-09-18 16:19:58 -07:00
test_working_copy_sparse.rs working_copy: do not overwrite ignored file 2022-08-07 15:06:30 +02:00
test_workspace.rs cleanup: rename checkout to wc_commit 2022-09-18 16:19:58 -07:00