From: Junio C Hamano Date: Tue, 16 Oct 2018 07:15:58 +0000 (+0900) Subject: Merge branch 'ab/commit-graph-progress' X-Git-Tag: v2.20.0-rc0~194 X-Git-Url: https://git.lorimer.id.au/gitweb.git/diff_plain/36d767d02e12c1ff991511b7bd8c1d023340f2ca Merge branch 'ab/commit-graph-progress' Generation of (experimental) commit-graph files have so far been fairly silent, even though it takes noticeable amount of time in a meaningfully large repository. The users will now see progress output. * ab/commit-graph-progress: gc: fix regression in 7b0f229222 impacting --quiet commit-graph verify: add progress output commit-graph write: add progress output --- 36d767d02e12c1ff991511b7bd8c1d023340f2ca diff --cc builtin/commit.c index b57d8e4b82,0d9828e29e..3f33ae6043 --- a/builtin/commit.c +++ b/builtin/commit.c @@@ -1653,9 -1651,6 +1653,9 @@@ int cmd_commit(int argc, const char **a "new_index file. Check that disk is not full and quota is\n" "not exceeded, and then \"git reset HEAD\" to recover.")); + if (git_env_bool(GIT_TEST_COMMIT_GRAPH, 0)) - write_commit_graph_reachable(get_object_directory(), 0); ++ write_commit_graph_reachable(get_object_directory(), 0, 0); + rerere(0); run_command_v_opt(argv_gc_auto, RUN_GIT_CMD); run_commit_hook(use_editor, get_index_file(), "post-commit", NULL); diff --cc commit-graph.h index b050476765,f50712a973..5678a8f4ca --- a/commit-graph.h +++ b/commit-graph.h @@@ -54,13 -52,8 +54,14 @@@ struct commit_graph struct commit_graph *load_commit_graph_one(const char *graph_file); +/* + * Return 1 if and only if the repository has a commit-graph + * file and generation numbers are computed in that file. + */ +int generation_numbers_enabled(struct repository *r); + - void write_commit_graph_reachable(const char *obj_dir, int append); + void write_commit_graph_reachable(const char *obj_dir, int append, + int report_progress); void write_commit_graph(const char *obj_dir, struct string_list *pack_indexes, struct string_list *commit_hex,