jj/lib
Martin von Zweigbergk 006c764694 backend: learn to store tree-level conflicts
Tree-level conflicts (#1624) will be stored as multiple trees
associated with a single commit. This patch adds support for that in
`backend::Commit` and in the backends.

When the Git backend writes a tree conflict, it creates a special root
tree for the commit. That tree has only the individual trees from the
conflict as subtrees. That way we prevent the trees from getting
GC'd. We also write the tree ids to the extra metadata table
(i.e. outside of the Git repo) so we don't need to load the tree
object to determine if there are conflicts.

I also added new flag to `backend::Commit` indicating whether the
commit is a new-style commit (with support for tree-level
conflicts). That will help with the migration. We will remove it once
we no longer care about old repos. When the flag is set, we know that
a commit with a single tree cannot have conflicts. When the flag is
not set, it's an old-style commit where we have to walk the whole tree
to find conflicts.
2023-07-19 22:04:16 -07:00
..
benches
gen-protos
src backend: learn to store tree-level conflicts 2023-07-19 22:04:16 -07:00
tests merged_tree: add an iterator over conflicts 2023-07-19 22:04:16 -07:00
testutils merged_tree: introduce a type for a set of trees to merge on the fly 2023-07-19 22:04:16 -07:00
Cargo.toml