git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] builtin-commit.c: do not remove COMMIT_EDITMSG
@ 2009-01-16 19:40 Stephan Beyer
  2009-01-16 21:15 ` Johannes Schindelin
  0 siblings, 1 reply; 2+ messages in thread
From: Stephan Beyer @ 2009-01-16 19:40 UTC (permalink / raw)
  To: git; +Cc: krh, gitster, Stephan Beyer

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 f5bbc3225c4b07 "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>
---
 builtin-commit.c |    1 -
 1 files changed, 0 insertions(+), 1 deletions(-)

diff --git a/builtin-commit.c b/builtin-commit.c
index e88b78f..977ea09 100644
--- a/builtin-commit.c
+++ b/builtin-commit.c
@@ -624,7 +624,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;
 	}
 
-- 
1.6.1.160.gecdb

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] builtin-commit.c: do not remove COMMIT_EDITMSG
  2009-01-16 19:40 [PATCH] builtin-commit.c: do not remove COMMIT_EDITMSG Stephan Beyer
@ 2009-01-16 21:15 ` Johannes Schindelin
  0 siblings, 0 replies; 2+ messages in thread
From: Johannes Schindelin @ 2009-01-16 21:15 UTC (permalink / raw)
  To: Stephan Beyer; +Cc: git, krh, gitster

Hi,

On Fri, 16 Jan 2009, Stephan Beyer wrote:

> This patch just removes the removal of COMMIT_EDITMSG.

LOL.  Let's hope we will not need a patch removing the remove of the 
removal.

Ciao,
Dscho

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2009-01-16 21:16 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-01-16 19:40 [PATCH] builtin-commit.c: do not remove COMMIT_EDITMSG Stephan Beyer
2009-01-16 21:15 ` Johannes Schindelin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).