git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH] Have git-revert, git-cherry-pick cleanup ./.msg upon successful completion.

From
Shawn O. Pearce <spearce@spearce.org>
Date
May 8, 2007, 01:35 UTC
Message-ID
<20070508013532.GA11311@spearce.org>
In-Reply-To
<7vps5efnv8.fsf@assigned-by-dhcp.cox.net>
Junio C Hamano <junkio@cox.net> wrote:
Show 11 quoted lines
> "Shawn O. Pearce" <spearce@spearce.org> writes:
> 
> > What about this change instead?  We make cherry-pick/revert
> > use the same temporary file as merge, which is under .git/
> > (something Alex mentioned he wanted).  I think the use of ".msg"
> > in cherry-pick/revert has always just been a bug, and not a feature,
> > so I'm really not against changing things around like this.
> 
> While I would not say this is not an improvement, this makes
> MERGE_MSG even less about merges and pushes us away from a
> sensible "git whatnow".
 
I think that ship has already sailed.  Look at builtin-revert.c
on:
    333         const char *target = git_path("MERGE_MSG");

We're already using MERGE_MSG to prep the message for a conflicted cherry-pick or revert that the user needs to resolve by hand. I think we do the same thing in git-rebase, don't we?

Gerrit's patch to try and use COMMIT_MSG feels wrong to me, as git-commit overwrites that file with what it gets from its "input".

I agree my patch steps us further from a "git whatnow", but we're already in deep with MERGE_MSG. We might as well keep that existing convention that it can be used to prep the commit message for the next git-commit invocation, and record other data somehow for the "git whatnow" case.

-- 
Shawn.
Previous: Junio C HamanoNext: Junio C Hamano
Message 6 of 10 in “git-commit -f <file>: take message from file, and remove file upon completion.”
  1. git-commit -f <file>: take message from file, and remove file upon completion.Gerrit Pape, May 4, 2007
  2. Have git-revert, git-cherry-pick cleanup ./.msg upon successful completion.Gerrit Pape, May 4, 2007
  3. Alex RiesenMay 4, 2007
  4. Shawn O. PearceMay 5, 2007
  5. Junio C HamanoMay 6, 2007
  6. Shawn O. PearceMay 8, 2007
  7. Junio C HamanoMay 8, 2007
  8. Gerrit PapeMay 7, 2007
  9. Have git-revert, git-cherry-pick use $GIT_DIR/COMMIT_MSG instead of ./.msg.Gerrit Pape, May 7, 2007
  10. git-commit: fix usage to show (-F|-f) <logfile>.Gerrit Pape, May 7, 2007

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.