]> git.ipfire.org Git - thirdparty/git.git/commit
repository: move 'repository_format_precious_objects' to repo scope
authorAyush Chandekar <ayu.chandekar@gmail.com>
Fri, 4 Jul 2025 14:12:34 +0000 (19:42 +0530)
committerJunio C Hamano <gitster@pobox.com>
Mon, 7 Jul 2025 15:31:13 +0000 (08:31 -0700)
commit44e300a97480ef272a596e02b912b72528043193
tree90837873d8d44102fff723593bb0f2437d7702af
parentcf6f63ea6bf35173e02e18bdc6a4ba41288acff9
repository: move 'repository_format_precious_objects' to repo scope

The 'extensions.preciousObjects' setting when set true, prevents
operations that might drop objects from the object storage. This setting
is populated in the global variable
'repository_format_precious_objects'.

Move this global variable to repo scope by adding it to 'struct
repository and also refactor all the occurences accordingly.

This change is part of an ongoing effort to eliminate global variables,
improve modularity and help libify the codebase.

Mentored-by: Christian Couder <christian.couder@gmail.com>
Mentored-by: Ghanshyam Thakkar <shyamthakkar001@gmail.com>
Signed-off-by: Ayush Chandekar <ayu.chandekar@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin/gc.c
builtin/prune.c
builtin/repack.c
environment.c
environment.h
repository.c
repository.h
setup.c