mirror of
https://github.com/git/git.git
synced 2025-12-12 20:36:24 +01:00
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>
This commit is contained in:
committed by
Junio C Hamano
parent
cf6f63ea6b
commit
44e300a974
@@ -151,6 +151,7 @@ struct repository {
|
||||
/* Configurations */
|
||||
int repository_format_worktree_config;
|
||||
int repository_format_relative_worktrees;
|
||||
int repository_format_precious_objects;
|
||||
|
||||
/* Indicate if a repository has a different 'commondir' from 'gitdir' */
|
||||
unsigned different_commondir:1;
|
||||
|
||||
Reference in New Issue
Block a user