jj/lib/src
Martin von Zweigbergk 1cc271441f gc: implement basic GC for Git backend
This adds an initial `jj util gc` command, which simply calls `git gc`
when using the Git backend. That should already be useful in
non-colocated repos because it's not obvious how to GC (repack) such
repos. In my own jj repo, it shrunk `.jj/repo/store/` from 2.4 GiB to
780 MiB, and `jj log --ignore-working-copy` was sped up from 157 ms to
86 ms.

I haven't added any tests because the functionality depends on having
`git` binary on the PATH, which we don't yet depend on anywhere
else. I think we'll still be able to test much of the future parts of
garbage collection without a `git` binary because the interesting
parts are about manipulating the Git repo before calling `git gc` on
it.
2023-12-03 07:40:12 -08:00
..
lock perf: add several #[instrument]s 2023-07-28 09:28:01 -07:00
protos working_copy: don't build intermediate HashMap from proto file states 2023-11-20 08:29:33 +09:00
backend.rs gc: implement basic GC for Git backend 2023-12-03 07:40:12 -08:00
commit.rs sign: Define signing backend API and integrate it 2023-11-30 23:36:56 +02:00
commit_builder.rs signing: pass SigningFn by reference 2023-12-01 22:55:04 +09:00
conflicts.rs cli: pass MaterializedTreeValue into git_diff_part() 2023-11-10 04:54:47 -08:00
content_hash.rs content_hash: make public 2023-09-18 07:53:19 -07:00
dag_walk.rs dag_walk: add fallible topo_order_reverse_lazy() 2023-11-14 07:16:39 +09:00
default_index_store.rs cleanup: don't use debug format to print source errors 2023-11-23 10:05:37 +09:00
default_revset_engine.rs repo_path: split RepoPath into owned and borrowed types 2023-11-28 07:33:28 +09:00
default_revset_graph_iterator.rs revset_graph: remove unneeded Vec<IndexGraphEdge> cloning 2023-08-04 06:19:22 +09:00
default_submodule_store.rs backends: deduplicate definition of backend names 2023-10-14 06:38:35 -07:00
diff.rs refactor(jj-lib): remove nightly_shims gunk 2023-07-17 18:38:26 -05:00
file_util.rs docs: warn about missing docs for jj-lib crate 2023-07-10 18:28:59 +03:00
files.rs merge: relax input type of Merge::from_removes_adds() 2023-11-07 17:10:12 +09:00
fmt_util.rs settings: support human-readable byte sizes for max-new-file-size 2023-08-17 19:29:38 -07:00
fsmonitor.rs fsmonitor: exclude .git and .jj directories from changed files 2023-11-23 18:48:14 +09:00
git.rs revset: make evaluate_programmatic() optimize expression 2023-11-24 21:13:58 -10:00
git_backend.rs gc: implement basic GC for Git backend 2023-12-03 07:40:12 -08:00
gitignore.rs Fix .gitignore handling of ignored directories 2023-08-22 22:08:32 -07:00
hex_util.rs docs: warn about missing docs for jj-lib crate 2023-07-10 18:28:59 +03:00
id_prefix.rs revset: resolve "@" symbol's workspace id earlier (while parsing) 2023-08-20 17:57:18 -07:00
index.rs docs: warn about missing docs for jj-lib crate 2023-07-10 18:28:59 +03:00
lib.rs sign: Define signing backend API and integrate it 2023-11-30 23:36:56 +02:00
local_backend.rs gc: implement basic GC for Git backend 2023-12-03 07:40:12 -08:00
local_working_copy.rs working_copy: narrow file_states recursively while visiting directories 2023-11-30 12:09:31 +09:00
lock.rs docs: warn about missing docs for jj-lib crate 2023-07-10 18:28:59 +03:00
matchers.rs matchers: clean up .walk_to(dir) to yield &RepoPath instead of iterator 2023-11-29 08:41:23 +09:00
merge.rs repo_path: add stub RepoPathBuf type, update callers 2023-11-28 07:33:28 +09:00
merged_tree.rs merged_tree: remove canceling terms prior to resolving file-level conflict 2023-12-03 07:44:58 +09:00
op_heads_store.rs operation: propagate OpStoreError from parents() 2023-11-14 07:16:39 +09:00
op_store.rs op_store: embed details in operation/view not found error 2023-11-11 22:35:40 +09:00
operation.rs operation: propagate OpStoreError from parents() 2023-11-14 07:16:39 +09:00
refs.rs merge: add Merge constructor that accepts interleaved values 2023-11-07 17:10:12 +09:00
repo.rs repo, workspace: remove 'static lifetime bound from initializer functions 2023-12-03 07:44:41 +09:00
repo_path.rs working_copy: add file states wrapper that provides map-like API 2023-11-30 12:09:31 +09:00
revset.pest revset: add 0-ary "::" and ".." operators as short for "all()" and "~root()" 2023-09-05 10:40:04 +09:00
revset.rs repo_path: add stub RepoPathBuf type, update callers 2023-11-28 07:33:28 +09:00
revset_graph.rs revsets: allow :: as synonym for : 2023-07-28 22:30:40 -07:00
rewrite.rs repo_path: split RepoPath into owned and borrowed types 2023-11-28 07:33:28 +09:00
settings.rs sign: Define signing backend API and integrate it 2023-11-30 23:36:56 +02:00
signing.rs sign: Define signing backend API and integrate it 2023-11-30 23:36:56 +02:00
simple_op_heads_store.rs backends: deduplicate definition of backend names 2023-10-14 06:38:35 -07:00
simple_op_store.rs op_store: embed details in operation/view not found error 2023-11-11 22:35:40 +09:00
stacked_table.rs misc: drop a few low-hanging unsafes 2023-11-08 02:16:08 +02:00
store.rs gc: implement basic GC for Git backend 2023-12-03 07:40:12 -08:00
str_util.rs cli: parse "git fetch --branch" parameter as string pattern 2023-10-25 03:58:48 +09:00
submodule_store.rs docs: warn about missing docs for jj-lib crate 2023-07-10 18:28:59 +03:00
transaction.rs operation: propagate OpStoreError from parents() 2023-11-14 07:16:39 +09:00
tree.rs merged_tree: remove canceling terms prior to resolving file-level conflict 2023-12-03 07:44:58 +09:00
tree_builder.rs repo_path: change .split() and .parent() to return &RepoPath 2023-11-29 08:41:23 +09:00
view.rs cli: add string pattern support to "git push --branch" 2023-10-26 04:51:17 +09:00
working_copy.rs repo_path: add stub RepoPathBuf type, update callers 2023-11-28 07:33:28 +09:00
workspace.rs repo, workspace: remove 'static lifetime bound from initializer functions 2023-12-03 07:44:41 +09:00