forked from mirrors/jj
0108673087
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`. |
||
---|---|---|
.. | ||
test_bad_locking.rs | ||
test_commit_builder.rs | ||
test_commit_concurrent.rs | ||
test_conflicts.rs | ||
test_diff_summary.rs | ||
test_git.rs | ||
test_index.rs | ||
test_init.rs | ||
test_load_repo.rs | ||
test_merge_trees.rs | ||
test_mut_repo.rs | ||
test_operations.rs | ||
test_refs.rs | ||
test_revset.rs | ||
test_revset_graph_iterator.rs | ||
test_rewrite.rs | ||
test_view.rs | ||
test_working_copy.rs | ||
test_working_copy_concurrent.rs | ||
test_working_copy_sparse.rs | ||
test_workspace.rs |