am: improve author-script error reporting
[gitweb.git] / builtin / commit.c
index b57d8e4b82052bdb85287b5fcb675261a68c639b..1d5292e4d827312d3a08ceb44f6a120cbd0c4576 100644 (file)
@@ -874,6 +874,7 @@ static int prepare_to_commit(const char *index_file, const char *prefix,
                s->use_color = 0;
                commitable = run_status(s->fp, index_file, prefix, 1, s);
                s->use_color = saved_color_setting;
+               string_list_clear(&s->change, 1);
        } else {
                struct object_id oid;
                const char *parent = "HEAD";
@@ -1654,7 +1655,7 @@ int cmd_commit(int argc, const char **argv, const char *prefix)
                      "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);