]> git.99rst.org Git - git.git/commit
builtin/gc: extract object database optimizations into separate function
authorPatrick Steinhardt <redacted>
Mon, 13 Jul 2026 05:52:07 +0000 (07:52 +0200)
committerJunio C Hamano <redacted>
Mon, 13 Jul 2026 15:13:16 +0000 (08:13 -0700)
commite86fe6fe62d0fb5b54a1afed6166d3e27d28f081
tree086ce23a7567e68d4685199ed9ffeb830fc9bfe0
parent3f8696804331ee9dacf49fa0c6fec4300a37b709
builtin/gc: extract object database optimizations into separate function

Extract the object database optimization logic from `cmd_gc()` into a
new `maintenance_task_odb()` helper function. This is a pure refactoring
with no intended functional change.

Note that the message that notifies the user about too many loose
objects is moved into the new function, as well. It is inherently an
implementation detail of how the "files" source works, and as a
consequence we'll move it around in a later commit, as well. This
reordering means that the warning may now be printed at a different
point in time, but it's not expected that this will have any practical
implications.

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