config: make packed_git_(limit|window_size) non-global variables

The variables `packed_git_window_size` and `packed_git_limit` are global
config variables used in the `packfile.c` file. Since it is only used in
this file, let's change it from being a global config variable to a
local variable for the subsystem.

With this, we rid `packfile.c` from all global variable usage and this
means we can also remove the `USE_THE_REPOSITORY_VARIABLE` guard from
the file.

Helped-by: Taylor Blau <me@ttaylorr.com>
Signed-off-by: Karthik Nayak <karthik.188@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
Karthik Nayak
2024-12-03 15:44:02 +01:00
committed by Junio C Hamano
parent d6b2d21fbf
commit d284713bae
7 changed files with 35 additions and 30 deletions

View File

@ -89,7 +89,7 @@ unsigned long repo_approximate_object_count(struct repository *r);
struct packed_git *find_oid_pack(const struct object_id *oid,
struct packed_git *packs);
void pack_report(void);
void pack_report(struct repository *repo);
/*
* mmap the index file for the specified packfile (if it is not