Skip to content

Commit

Permalink
builtin-commit.c: do not remove COMMIT_EDITMSG
Browse files Browse the repository at this point in the history
git-commit tries to remove the file ./COMMIT_EDITMSG instead of
$GIT_DIR/COMMIT_EDITMSG after commit preparation (e.g. running
hooks, launching editor).
This behavior exists since f5bbc32 "Port git commit to C".

Some test cases (e.g. t/t7502-commit.sh) rely on the existence of
$GIT_DIR/COMMIT_EDITMSG after committing and, I guess, many people
are used to it.  So it is best not to remove it.

This patch just removes the removal of COMMIT_EDITMSG.

Signed-off-by: Stephan Beyer <s-beyer@gmx.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
  • Loading branch information
Stephan Beyer authored and Junio C Hamano committed Jan 18, 2009
1 parent f8aa1b6 commit 2454ac7
Showing 1 changed file with 0 additions and 1 deletion.
1 change: 0 additions & 1 deletion builtin-commit.c
Original file line number Diff line number Diff line change
Expand Up @@ -625,7 +625,6 @@ static int prepare_to_commit(const char *index_file, const char *prefix)
if (!commitable && !in_merge && !allow_empty &&
!(amend && is_a_merge(head_sha1))) {
run_status(stdout, index_file, prefix, 0);
unlink(commit_editmsg);
return 0;
}

Expand Down

0 comments on commit 2454ac7

Please sign in to comment.