jj/cli
Yuya Nishihara ea8aa1e17c index: don't preserve commits not referred to by operations/views
In this implementation, we assume that predecessor commits created by old jj are
reachable from at least one of the historical views. However, there are a couple
of commands which create transitive predecessors. For example, "jj squash" into
grandparent will rebase a rewritten source, so the pre-rebase source commit
won't be visible to any views. To work around the problem, all immediate
predecessors of historically visible commits are also preserved.

Note that this change should be considered forward-incompatible change. The
stored commits may have unreachable predecessors once we run "jj op abandon &&
jj util gc".

WalkPredecessors::flush_commits() doesn't need to guard against unreachable
commits. I was wondering whether values (or old ids) of op.commit_predecessors
map should be preserved, and I decided to keep both keys and values. It's nice
that we can get rid of index.has_id() calls when we drop support for legacy
commit.predecessors.
2025-07-03 09:06:21 +00:00
..
examples templater: inline expect_<construct>_with() parsing helpers 2025-06-30 13:54:57 +00:00
src index: don't preserve commits not referred to by operations/views 2025-07-03 09:06:21 +00:00
testing diff: Run external diff tools in their temp dir 2025-05-12 21:34:19 +00:00
tests index: don't preserve commits not referred to by operations/views 2025-07-03 09:06:21 +00:00
build.rs build: fix cargo publish by symlinking cli/docs->docs 2024-11-05 17:37:14 -08:00
Cargo.toml merge-tools builtin: add property-based testing 2025-06-18 20:45:56 +00:00
docs build: fix cargo publish by symlinking cli/docs->docs 2024-11-05 17:37:14 -08:00
LICENSE