aboutsummaryrefslogtreecommitdiffstats
path: root/commit-graph.c
diff options
context:
space:
mode:
authorPatrick Steinhardt <ps@pks.im>2025-10-24 08:57:15 +0200
committerJunio C Hamano <gitster@pobox.com>2025-10-24 13:42:42 -0700
commit60c0af8e20b7c347003c40ca342a074239ea8453 (patch)
treebed535d640d47c9f203f466b86b0e0340d739c2a /commit-graph.c
parentbuiltin/gc: remove global `repack` variable (diff)
downloadgit-60c0af8e20b7c347003c40ca342a074239ea8453.tar.gz
git-60c0af8e20b7c347003c40ca342a074239ea8453.zip
builtin/gc: make `too_many_loose_objects()` reusable without GC config
To decide whether or not a repository needs to be repacked we estimate the number of loose objects. If the number exceeds a certain threshold we perform the repack, otherwise we don't. This is done via `too_many_loose_objects()`, which takes as parameter the `struct gc_config`. This configuration is only used to determine the threshold. In a subsequent commit we'll add another caller of this function that wants to pass a different limit than the one stored in that structure. Refactor the function accordingly so that we only take the limit as parameter instead of the whole structure. Signed-off-by: Patrick Steinhardt <ps@pks.im> Acked-by: Taylor Blau <me@ttaylorr.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'commit-graph.c')
0 files changed, 0 insertions, 0 deletions