ok/jj
1
0
Fork 0
forked from mirrors/jj
jj/cli
Martin von Zweigbergk 81e9ba3d51 workspace: make recovery commit empty instead of deleting everything
The recovery commit we create when we run into a stale working copy
with a missing operation currently has an empty tree. Our commit
backend at Google creates an index of which files changed in each
commit. That gets really expensive when a commit deletes all files in
the repo, as these recovery commits do. So for our backend, it is much
better to make the recovery commit empty instead. That's what this
patch does.

It almost doesn't matter functionally what tree we use for it since we
don't care much about the current tree when snapshotting the working
copy. It does matter in a few cases, however. One case is for
conflicts. In that case, it's likely better to use the recovery
commit's parent as base tree (as we do by making the recovery commit
empty) than to use an empty tree, as that would guarantee that all
conflicts would be considered resolved. (Side note: perhaps we should
start looking at the current commit's parent instead of looking at the
current commit when snapshotting, but that's a topic for another day.)
2024-02-27 06:45:25 -08:00
..
examples Switch to ignore crate for gitignore handling. 2024-02-20 09:12:46 -08:00
src workspace: make recovery commit empty instead of deleting everything 2024-02-27 06:45:25 -08:00
testing revset: ad-hoc optimization for range queries containing unwanted wanted heads 2024-02-22 23:26:29 +09:00
tests workspace: make recovery commit empty instead of deleting everything 2024-02-27 06:45:25 -08:00
build.rs
Cargo.toml completion: Add support for Nushell completions 2024-02-18 19:08:38 +01:00
LICENSE