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

Re: [PATCH 1/2] commit.c - provide commit-type to the hooks/pre-commit script

From
Mark Levedahl <mlevedahl@gmail.com>
Date
Jun 8, 2010, 02:55 UTC
Message-ID
<4C0DB11F.90904@gmail.com>
In-Reply-To
<20100607063817.GA23361@coredump.intra.peff.net>
On 06/07/2010 02:38 AM, Jeff King wrote:
Show 12 quoted lines
> Actually, I meant to provide the hook with the literal words "HEAD~1"
> and "HEAD", not the sha1. So they are effectively magic words, but they
> also happen to be useful for directly feeding to git commands.
>
> It also extends naturally to indicating a merge commit ("HEAD" or
> "HEAD~1" followed by some other ref). I don't know if that is useful or
> not, but it seems like the same realm of information as whether or not
> we are amending.
>
> -Peff
>
>    

I agree with this, though I have no itch regarding all of the commit parents for a merge commit so I'll leave that for another to scratch. So, I'm sending a new series to use HEAD~1 and HEAD rather than amend and normal.

Mark
Previous: Jeff King
Message 7 of 7 in “commit.c - provide commit-type to the hooks/pre-commit script”
  1. 1/2 commit.c - provide commit-type to the hooks/pre-commit scriptMark Levedahl, Jun 5, 2010
  2. 2/2 git-gui - provide commit-type to the hooks/pre-commit scriptMark Levedahl, Jun 5, 2010
  3. Jeff KingJun 6, 2010
  4. Mark LevedahlJun 7, 2010
  5. Johannes SixtJun 7, 2010
  6. Jeff KingJun 7, 2010
  7. Mark LevedahlJun 8, 2010

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.