Thread (1 message) 1 message, 1 author, 2016-06-15

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

From: Matthieu Moy <hidden>
Date: 2016-06-15 23:06:18

Junio C Hamano [off-list ref] 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/
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help