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

Re: [RTC/PATCH] Add 'update-branch' hook

From
Felipe Contreras <felipe.contreras@gmail.com>
Date
Apr 24, 2014, 01:00 UTC
Message-ID
<535862411c29d_3c7abff3103e@nysa.notmuch>
In-Reply-To
<xmqqvbtzwv4l.fsf@gitster.dls.corp.google.com>
Junio C Hamano wrote:
Show 17 quoted lines
> Felipe Contreras <felipe.contreras@gmail.com> writes:
> 
> > Junio C Hamano wrote:
> >> Felipe Contreras <felipe.contreras@gmail.com> writes:
> >> 
> >> > ... there are _already_ hooks without pre/post.
> >> 
> >> Like commit-msg?  Yes, it would have been nicer if it were named
> >> verify-commit-message or something.
> >
> > No it wouldn't. I can use the commit-msg hook to change the commit message and
> > to absolutely no verification, so verify-commit-message would be misleading.
> 
> You are confused (and please do not spread the confusion).  If you
> read the first paragraph of the documentation on the hook and think
> for 5 seconds why "--no-verify" countermands it, you would realize
> that the hook is primarily meant for verification.

I do not care what the hook is "primarily for", it's for more than just verification.

> We also allow the hook to edit the message, but that is not even "a useful
> feature added as an afterthought"; the documentation mentions it because the
> implementation did not bother to make sure the hook did not touch the message
> file.

Indeed it's too late now, and now the hook does more than just verification, therefore verify-commit-message wouldn't be an appropriate name.

> It was a mistake not to call it with a clear name that tells
> verification happens there.

No, the name is fine for what the hook does, if you would want the script to do something different, *and* change the name of the script, that's a different issue.

Show 5 quoted lines
> >> Old mistakes are harder to change because of inertia.  It is not a
> >> good excuse to knowingly make a new mistake to add new exceptions
> >> that the users need to check documentations for, is it?
> 
> I see no reason to waste more time on this point.
You haven't proved it's a mistake.

The only thing you have showed is that letting the 'commit-msg' modify the message was a mistake, not that the name is wrong for what it currently does.

-- 
Felipe Contreras
Previous: Junio C HamanoNext: Ilya Bobyr
Message 26 of 39 in “Add 'update-branch' hook”
  1. Add 'update-branch' hookFelipe Contreras, Apr 21, 2014
  2. Eric SunshineApr 21, 2014
  3. Ilya BobyrApr 21, 2014
  4. Felipe ContrerasApr 21, 2014
  5. Ilya BobyrApr 21, 2014
  6. Felipe ContrerasApr 21, 2014
  7. Ilya BobyrApr 21, 2014
  8. Felipe ContrerasApr 21, 2014
  9. Stephen LeakeApr 22, 2014
  10. Felipe ContrerasApr 22, 2014
  11. Ilya BobyrApr 22, 2014
  12. Felipe ContrerasApr 22, 2014
  13. Stephen LeakeApr 23, 2014
  14. Felipe ContrerasApr 23, 2014
  15. Junio C HamanoApr 23, 2014
  16. Felipe ContrerasApr 24, 2014
  17. Junio C HamanoApr 26, 2014
  18. Felipe ContrerasApr 26, 2014
  19. Stephen LeakeApr 24, 2014
  20. Felipe ContrerasApr 24, 2014
  21. Junio C HamanoApr 21, 2014
  22. Felipe ContrerasApr 21, 2014
  23. Junio C HamanoApr 21, 2014
  24. Felipe ContrerasApr 23, 2014
  25. Junio C HamanoApr 23, 2014
  26. Felipe ContrerasApr 24, 2014
  27. Ilya BobyrApr 22, 2014
  28. Felipe ContrerasApr 22, 2014
  29. Ilya BobyrApr 21, 2014
  30. Felipe ContrerasApr 21, 2014
  31. Ilya BobyrApr 21, 2014
  32. Felipe ContrerasApr 21, 2014
  33. Ilya BobyrApr 22, 2014
  34. Felipe ContrerasApr 22, 2014
  35. Felipe ContrerasApr 21, 2014
  36. Ilya BobyrApr 22, 2014
  37. Felipe ContrerasApr 22, 2014
  38. Ilya BobyrApr 22, 2014
  39. Felipe ContrerasApr 22, 2014

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.