"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);
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,