git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] builtin-commit: remove .git/SQUASH_MSG upon successful commit
@ 2008-02-08  9:53 Gerrit Pape
  2008-02-08 10:03 ` Junio C Hamano
  2008-02-10  7:25 ` Junio C Hamano
  0 siblings, 2 replies; 4+ messages in thread
From: Gerrit Pape @ 2008-02-08  9:53 UTC (permalink / raw)
  To: git, Junio C Hamano

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset=unknown-8bit, Size: 996 bytes --]

After doing a merge --squash, and commit afterwards, the commit message
template SQUASH_MSG in the git directory is not removed, which means that
the content of SQUASH_MSG is used as default commit message for all
subsequent commits.  So have git commit remove the file SQUASH_MSG from
the git directory upon a successful commit.

The problem was discovered by Frédéric Brière, reported through
 http://bugs.debian.org/464656

Signed-off-by: Gerrit Pape <pape@smarden.org>
---
 builtin-commit.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/builtin-commit.c b/builtin-commit.c
index c787bed..3a47275 100644
--- a/builtin-commit.c
+++ b/builtin-commit.c
@@ -929,6 +929,7 @@ int cmd_commit(int argc, const char **argv, const char *prefix)
 
 	unlink(git_path("MERGE_HEAD"));
 	unlink(git_path("MERGE_MSG"));
+	unlink(git_path("SQUASH_MSG"));
 
 	if (commit_index_files())
 		die ("Repository has been updated, but unable to write\n"
-- 
1.5.4

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

* Re: [PATCH] builtin-commit: remove .git/SQUASH_MSG upon successful commit
  2008-02-08  9:53 [PATCH] builtin-commit: remove .git/SQUASH_MSG upon successful commit Gerrit Pape
@ 2008-02-08 10:03 ` Junio C Hamano
  2008-02-10  7:25 ` Junio C Hamano
  1 sibling, 0 replies; 4+ messages in thread
From: Junio C Hamano @ 2008-02-08 10:03 UTC (permalink / raw)
  To: Gerrit Pape; +Cc: git

Gerrit Pape <pape@smarden.org> writes:

> After doing a merge --squash, and commit afterwards, the commit message
> template SQUASH_MSG in the git directory is not removed, which means that
> the content of SQUASH_MSG is used as default commit message for all
> subsequent commits.  So have git commit remove the file SQUASH_MSG from
> the git directory upon a successful commit.

It appears that there are a few more differences from what
contrib/examples/git-commit.sh used to do.  For example, the
COMMIT_EDITMSG file used to be removed at around the same place
as the SQUASH_MSG file.

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

* Re: [PATCH] builtin-commit: remove .git/SQUASH_MSG upon successful commit
  2008-02-08  9:53 [PATCH] builtin-commit: remove .git/SQUASH_MSG upon successful commit Gerrit Pape
  2008-02-08 10:03 ` Junio C Hamano
@ 2008-02-10  7:25 ` Junio C Hamano
  2008-02-11 10:29   ` Gerrit Pape
  1 sibling, 1 reply; 4+ messages in thread
From: Junio C Hamano @ 2008-02-10  7:25 UTC (permalink / raw)
  To: Gerrit Pape; +Cc: git

Gerrit Pape <pape@smarden.org> writes:

> After doing a merge --squash, and commit afterwards, the commit message
> template SQUASH_MSG in the git directory is not removed, which means that
> the content of SQUASH_MSG is used as default commit message for all
> subsequent commits.  So have git commit remove the file SQUASH_MSG from
> the git directory upon a successful commit.

As your message was marked with

        MIME-Version: 1.0
        Content-Type: text/plain; charset=unknown-8bit

I am getting this, which would most likely to be wrong rendition
of Fr???ic's name.

> The problem was discovered by Fr馘駻ic Bri鑽e, reported through

Is the name "Frédéric Brière"?

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

* Re: [PATCH] builtin-commit: remove .git/SQUASH_MSG upon successful commit
  2008-02-10  7:25 ` Junio C Hamano
@ 2008-02-11 10:29   ` Gerrit Pape
  0 siblings, 0 replies; 4+ messages in thread
From: Gerrit Pape @ 2008-02-11 10:29 UTC (permalink / raw)
  To: Junio C Hamano; +Cc: git

On Sat, Feb 09, 2008 at 11:25:51PM -0800, Junio C Hamano wrote:
> As your message was marked with
> 
>         MIME-Version: 1.0
>         Content-Type: text/plain; charset=unknown-8bit
> 
> I am getting this, which would most likely to be wrong rendition
> of Fr???ic's name.
> 
> > The problem was discovered by Fr馘駻ic Bri鑽e, reported through
> 
> Is the name "Frédéric Brière"?

Sorry.  Yes, it's "Frédéric Brière" ;).

Regards, Gerrit.

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

end of thread, other threads:[~2008-02-11 10:30 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-02-08  9:53 [PATCH] builtin-commit: remove .git/SQUASH_MSG upon successful commit Gerrit Pape
2008-02-08 10:03 ` Junio C Hamano
2008-02-10  7:25 ` Junio C Hamano
2008-02-11 10:29   ` Gerrit Pape

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).