Merge branch 'es/mark-gc-cruft-as-experimental'
Enable gc.cruftpacks by default for those who opt into feature.experimental setting. * es/mark-gc-cruft-as-experimental: config: let feature.experimental imply gc.cruftPacks=true gc: add tests for --cruft and friends
This commit is contained in:
@ -42,7 +42,7 @@ static const char * const builtin_gc_usage[] = {
|
||||
|
||||
static int pack_refs = 1;
|
||||
static int prune_reflogs = 1;
|
||||
static int cruft_packs = 0;
|
||||
static int cruft_packs = -1;
|
||||
static int aggressive_depth = 50;
|
||||
static int aggressive_window = 250;
|
||||
static int gc_auto_threshold = 6700;
|
||||
@ -593,6 +593,10 @@ int cmd_gc(int argc, const char **argv, const char *prefix)
|
||||
if (prune_expire && parse_expiry_date(prune_expire, &dummy))
|
||||
die(_("failed to parse prune expiry value %s"), prune_expire);
|
||||
|
||||
prepare_repo_settings(the_repository);
|
||||
if (cruft_packs < 0)
|
||||
cruft_packs = the_repository->settings.gc_cruft_packs;
|
||||
|
||||
if (aggressive) {
|
||||
strvec_push(&repack, "-f");
|
||||
if (aggressive_depth > 0)
|
||||
@ -704,7 +708,6 @@ int cmd_gc(int argc, const char **argv, const char *prefix)
|
||||
clean_pack_garbage();
|
||||
}
|
||||
|
||||
prepare_repo_settings(the_repository);
|
||||
if (the_repository->settings.gc_write_commit_graph == 1)
|
||||
write_commit_graph_reachable(the_repository->objects->odb,
|
||||
!quiet && !daemonized ? COMMIT_GRAPH_WRITE_PROGRESS : 0,
|
||||
|
||||
Reference in New Issue
Block a user