jj/lib
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
..
src backend: let each backend handle root commit on write 2022-09-20 21:20:57 -07:00
tests backend: let each backend handle root commit on write 2022-09-20 21:20:57 -07:00
build.rs protos: use run_from_script() in build.rs 2022-05-05 11:46:40 -07:00
Cargo.toml cargo: bump itertools from 0.10.4 to 0.10.5 2022-09-20 10:54:43 -07:00