Merge branch 'ab/commit-graph-progress'
authorJunio C Hamano <gitster@pobox.com>
Tue, 16 Oct 2018 07:15:58 +0000 (16:15 +0900)
committerJunio C Hamano <gitster@pobox.com>
Tue, 16 Oct 2018 07:15:58 +0000 (16:15 +0900)
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

1  2 
builtin/commit.c
builtin/gc.c
commit-graph.c
commit-graph.h
index b57d8e4b82052bdb85287b5fcb675261a68c639b,0d9828e29ebe89f037e68761d5cd5b407339cd48..3f33ae60430d5d0ba52a6956539b1dadbb10e309
@@@ -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."));
  
-               write_commit_graph_reachable(get_object_directory(), 0);
 +      if (git_env_bool(GIT_TEST_COMMIT_GRAPH, 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 builtin/gc.c
Simple merge
diff --cc commit-graph.c
Simple merge
diff --cc commit-graph.h
index b05047676514e4d031ac90de50510eb33a4b6db6,f50712a973a2a88d84cbce35acf54276bb3ed021..5678a8f4cad2ddec9c7c50a31f0a54abc026f951
@@@ -54,13 -52,8 +54,14 @@@ struct commit_graph 
  
  struct commit_graph *load_commit_graph_one(const char *graph_file);
  
- void write_commit_graph_reachable(const char *obj_dir, int append);
 +/*
 + * 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,
+                                 int report_progress);
  void write_commit_graph(const char *obj_dir,
                        struct string_list *pack_indexes,
                        struct string_list *commit_hex,