Merge branch 'ds/feature-macros'
A mechanism to affect the default setting for a (related) group of configuration variables is introduced. * ds/feature-macros: repo-settings: create feature.experimental setting repo-settings: create feature.manyFiles setting repo-settings: parse core.untrackedCache commit-graph: turn on commit-graph by default t6501: use 'git gc' in quiet mode repo-settings: consolidate some config settings
This commit is contained in:
12
builtin/gc.c
12
builtin/gc.c
@ -41,7 +41,6 @@ static int aggressive_depth = 50;
|
||||
static int aggressive_window = 250;
|
||||
static int gc_auto_threshold = 6700;
|
||||
static int gc_auto_pack_limit = 50;
|
||||
static int gc_write_commit_graph;
|
||||
static int detach_auto = 1;
|
||||
static timestamp_t gc_log_expire_time;
|
||||
static const char *gc_log_expire = "1.day.ago";
|
||||
@ -148,7 +147,6 @@ static void gc_config(void)
|
||||
git_config_get_int("gc.aggressivedepth", &aggressive_depth);
|
||||
git_config_get_int("gc.auto", &gc_auto_threshold);
|
||||
git_config_get_int("gc.autopacklimit", &gc_auto_pack_limit);
|
||||
git_config_get_bool("gc.writecommitgraph", &gc_write_commit_graph);
|
||||
git_config_get_bool("gc.autodetach", &detach_auto);
|
||||
git_config_get_expiry("gc.pruneexpire", &prune_expire);
|
||||
git_config_get_expiry("gc.worktreepruneexpire", &prune_worktrees_expire);
|
||||
@ -685,11 +683,11 @@ int cmd_gc(int argc, const char **argv, const char *prefix)
|
||||
clean_pack_garbage();
|
||||
}
|
||||
|
||||
if (gc_write_commit_graph &&
|
||||
write_commit_graph_reachable(get_object_directory(),
|
||||
!quiet && !daemonized ? COMMIT_GRAPH_WRITE_PROGRESS : 0,
|
||||
NULL))
|
||||
return 1;
|
||||
prepare_repo_settings(the_repository);
|
||||
if (the_repository->settings.gc_write_commit_graph == 1)
|
||||
write_commit_graph_reachable(get_object_directory(),
|
||||
!quiet && !daemonized ? COMMIT_GRAPH_WRITE_PROGRESS : 0,
|
||||
NULL);
|
||||
|
||||
if (auto_gc && too_many_loose_objects())
|
||||
warning(_("There are too many unreachable loose objects; "
|
||||
|
Reference in New Issue
Block a user