Merge branch 'jh/msvc'
[gitweb.git] / builtin / commit.c
index 1c9e8e2228c7ce58375bc247c4ad5850a1bd7d2d..851b257867f5fecd326b5426936252cee1383352 100644 (file)
@@ -1658,7 +1658,7 @@ int cmd_commit(int argc, const char **argv, const char *prefix)
                die("%s", err.buf);
        }
 
-       sequencer_post_commit_cleanup(the_repository);
+       sequencer_post_commit_cleanup(the_repository, 0);
        unlink(git_path_merge_head(the_repository));
        unlink(git_path_merge_msg(the_repository));
        unlink(git_path_merge_mode(the_repository));
@@ -1667,10 +1667,11 @@ int cmd_commit(int argc, const char **argv, const char *prefix)
        if (commit_index_files())
                die(_("repository has been updated, but unable to write\n"
                      "new_index file. Check that disk is not full and quota is\n"
-                     "not exceeded, and then \"git reset HEAD\" to recover."));
+                     "not exceeded, and then \"git restore --staged :/\" to recover."));
 
-       if (git_env_bool(GIT_TEST_COMMIT_GRAPH, 0))
-               write_commit_graph_reachable(get_object_directory(), 0, 0);
+       if (git_env_bool(GIT_TEST_COMMIT_GRAPH, 0) &&
+           write_commit_graph_reachable(get_object_directory(), 0))
+               return 1;
 
        repo_rerere(the_repository, 0);
        run_command_v_opt(argv_gc_auto, RUN_GIT_CMD);