diff options
author | Junio C Hamano <gitster@pobox.com> | 2020-09-25 15:25:38 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2020-09-25 15:25:38 -0700 |
commit | 48794acc50f14394ca6c4f5092a4a498f409f350 (patch) | |
tree | 8e3a6130340ff7a54fc8c99443501ba2ec1453c1 /builtin/fetch.c | |
parent | Sixteenth batch (diff) | |
parent | maintenance: add trace2 regions for task execution (diff) | |
download | tgif-48794acc50f14394ca6c4f5092a4a498f409f350.tar.xz |
Merge branch 'ds/maintenance-part-1'
A "git gc"'s big brother has been introduced to take care of more
repository maintenance tasks, not limited to the object database
cleaning.
* ds/maintenance-part-1:
maintenance: add trace2 regions for task execution
maintenance: add auto condition for commit-graph task
maintenance: use pointers to check --auto
maintenance: create maintenance.<task>.enabled config
maintenance: take a lock on the objects directory
maintenance: add --task option
maintenance: add commit-graph task
maintenance: initialize task array
maintenance: replace run_auto_gc()
maintenance: add --quiet option
maintenance: create basic maintenance runner
Diffstat (limited to 'builtin/fetch.c')
-rw-r--r-- | builtin/fetch.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/builtin/fetch.c b/builtin/fetch.c index 1b00c2bee9..d5bf526277 100644 --- a/builtin/fetch.c +++ b/builtin/fetch.c @@ -200,8 +200,10 @@ static struct option builtin_fetch_options[] = { OPT_STRING_LIST(0, "negotiation-tip", &negotiation_tip, N_("revision"), N_("report that we have only objects reachable from this object")), OPT_PARSE_LIST_OBJECTS_FILTER(&filter_options), + OPT_BOOL(0, "auto-maintenance", &enable_auto_gc, + N_("run 'maintenance --auto' after fetching")), OPT_BOOL(0, "auto-gc", &enable_auto_gc, - N_("run 'gc --auto' after fetching")), + N_("run 'maintenance --auto' after fetching")), OPT_BOOL(0, "show-forced-updates", &fetch_show_forced_updates, N_("check for forced-updates on all updated branches")), OPT_BOOL(0, "write-commit-graph", &fetch_write_commit_graph, @@ -1925,7 +1927,7 @@ int cmd_fetch(int argc, const char **argv, const char *prefix) close_object_store(the_repository->objects); if (enable_auto_gc) - run_auto_gc(verbosity < 0); + run_auto_maintenance(verbosity < 0); return result; } |