builtin/mktree: remove hard-coded constant
[gitweb.git] / builtin / commit.c
index fa3e53232d2d24564a2de6370b3bdef72a153735..b57d8e4b82052bdb85287b5fcb675261a68c639b 100644 (file)
@@ -34,6 +34,7 @@
 #include "mailmap.h"
 #include "help.h"
 #include "commit-reach.h"
+#include "commit-graph.h"
 
 static const char * const builtin_commit_usage[] = {
        N_("git commit [<options>] [--] <pathspec>..."),
@@ -1652,6 +1653,9 @@ int cmd_commit(int argc, const char **argv, const char *prefix)
                      "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);
+
        rerere(0);
        run_command_v_opt(argv_gc_auto, RUN_GIT_CMD);
        run_commit_hook(use_editor, get_index_file(), "post-commit", NULL);