Skip to content

Commit 3858da5

Browse files
Repack everything into a single pack in mirror repo
Over time, josh creates multiple packfiles in the mirror repo. This will eventually make Transaction::open() very slow due to git2 iterating through packfiles in a readdir() loop and producing _a lot_ of i/o syscalls. This PR changes the arguments of `git repack` for the mirror repo.
1 parent 9052d3c commit 3858da5

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

josh-core/src/housekeeping.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -362,8 +362,9 @@ pub fn run(repo_path: &std::path::Path, do_gc: bool) -> JoshResult<()> {
362362
&[
363363
"git",
364364
"repack",
365-
"-dn",
365+
"-adn",
366366
"--keep-unreachable",
367+
"--pack-kept-objects",
367368
"--no-write-bitmap-index",
368369
"--threads=4"
369370
]

0 commit comments

Comments
 (0)