From: Junio C Hamano Date: Tue, 16 Oct 2018 07:16:05 +0000 (+0900) Subject: Merge branch 'en/status-multiple-renames-to-the-same-target-fix' X-Git-Tag: v2.20.0-rc0~178 X-Git-Url: https://git.lorimer.id.au/gitweb.git/diff_plain/98f3f007f520de518c732c74085234dede144926?ds=sidebyside;hp=-c Merge branch 'en/status-multiple-renames-to-the-same-target-fix' The code in "git status" sometimes hit an assertion failure. This was caused by a structure that was reused without cleaning the data used for the first run, which has been corrected. * en/status-multiple-renames-to-the-same-target-fix: commit: fix erroneous BUG, 'multiple renames on the same target? how?' --- 98f3f007f520de518c732c74085234dede144926 diff --combined builtin/commit.c index 3f33ae6043,83233ca1a5..1d5292e4d8 --- a/builtin/commit.c +++ b/builtin/commit.c @@@ -33,8 -33,6 +33,8 @@@ #include "sequencer.h" #include "mailmap.h" #include "help.h" +#include "commit-reach.h" +#include "commit-graph.h" static const char * const builtin_commit_usage[] = { N_("git commit [] [--] ..."), @@@ -874,6 -872,7 +874,7 @@@ static int prepare_to_commit(const cha 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"; @@@ -1653,9 -1652,6 +1654,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.")); + 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);