]> git.99rst.org Git - git.git/commit
builtin/gc: make repack arguments self-contained
authorPatrick Steinhardt <redacted>
Mon, 13 Jul 2026 05:52:08 +0000 (07:52 +0200)
committerJunio C Hamano <redacted>
Mon, 13 Jul 2026 15:13:16 +0000 (08:13 -0700)
commit4d93bf9873696a33a9959c912e7a3fa4fb56a82b
tree2f2b107dc968fc6f68c6b90c87a1d0fe07161040
parente86fe6fe62d0fb5b54a1afed6166d3e27d28f081
builtin/gc: make repack arguments self-contained

When optimizing the object database most of the heavy-lifting is done by
git-repack(1). The arguments we pass to this function are assembled in
global scope, which is hard to follow.

Refactor the logic by moving the vector into `maintenance_task_odb()`.
While that means we have to pass more arguments to this function, it has
the upside that the logic becomes self-contained without any kind of
global interdependencies.

This is a pure refactoring with no intended functional change.

Signed-off-by: Patrick Steinhardt <redacted>
Signed-off-by: Junio C Hamano <redacted>
builtin/gc.c
git clone https://git.99rst.org/PROJECT