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

Re: [PATCH v2 2/2] trailer: support multiline title

From
Matthieu Moy <matthieu.moy@grenoble-inp.fr>
Date
Aug 26, 2015, 16:15 UTC
Message-ID
<vpqpp2akovk.fsf@anie.imag.fr>
In-Reply-To
<xmqqk2siujak.fsf@gitster.dls.corp.google.com>
Junio C Hamano <gitster@pobox.com> writes:
> While the reordering would certainly stop showing the comments and
> patch, I am not sure if that is a move in the right direction.  It
> will rob from the hooks information that they have traditionally
> been given---

The information given in the comments do not have a 100% stable format, and the hook is executed after letting the user possibly edit or delete it, so I'm tempted to say that a hook using the commit comment is broken.

Using the diff in the hook _is_ really broken: it relies on the user calling "git commit" with -v, and there's nothing to garantee that.

> it will break some hooks.

It will also repair some hooks that were broken, but whose breakage was never noticed or never explained.

> After all, interpret-trailers was invented exactly because we did not
> want individual hooks to roll their own ways to detect the end of the
> message proper, so the command should know where the message ends.
Right, but you can't prevent people from writting
command-that-shows-stuff >> "$1"

in their commit-msg hook. And these people will keep wondering why their hook "sometimes doesn't work" (that's how I considered it for a while, it took me a few commits to notice the correlation between "-v" and lack of sign-off).

-- 
Matthieu Moy
http://www-verimag.imag.fr/~moy/
Previous: Junio C HamanoNext: Junio C Hamano
Message 7 of 9 in “trailer: ignore first line of message”
  1. 1/2 trailer: ignore first line of messageChristian Couder, Aug 26, 2015
  2. 2/2 trailer: support multiline titleChristian Couder, Aug 26, 2015
  3. Matthieu MoyAug 26, 2015
  4. Jacob KellerAug 26, 2015
  5. Christian CouderAug 26, 2015
  6. Junio C HamanoAug 26, 2015
  7. Matthieu MoyAug 26, 2015
  8. Junio C HamanoAug 26, 2015
  9. Christian CouderAug 29, 2015

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.