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 23, 2014, 21:30 UTC
Message-ID
<53583111dd8ad_24448772ec17@nysa.notmuch>
In-Reply-To
<xmqqtx9m70fh.fsf@gitster.dls.corp.google.com>
Junio C Hamano wrote:
Show 6 quoted lines
> 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.

Maybe you would like modify-and-or-verify-commit-message which would be correct, but I wouldn't, I like short-and-sweet, and commit-msg is just that.

> 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?

That's a nifty trick; label something a mistake, and then it suddenly becomes one.

No, it's not a mistake, first it has to be proven to be mistake and I haven't seen any arguments that try to do so.

Besides it's a red herring, you said such a name would be original and I've just proved that it's not original, so the originality is not a concern.

> > And it's not confusing,
> 
> A simple fact that Ilya asked the question tells us otherwise ;-)
It's not any more confusing than these:
applypatch-msg:
When does this happen? Can I return an error?
pre-applypatch:
Again when does it happen? What does the input contains? The whole patch? Including the message?
post-applypatch:
Totally confused.

pre-commit: prepare-commit-msg: commit-msg:

What is the difference between these? Doesn't pre-commit contains the message already?
pre-receive:
Before receiving what?
update:
Updating what? When is it called? Can I cancel something?
The fact that somebody asked a question doesn't make a name confusing.
> I personally do not see an immediate need for post-update-branch,
> but if the new hook is about intervening an operation,
It's not about that, I can remove that feature if it would make you happier.
> Otherwise it would be impossible to later add "post-update-branch"
Which is never going to happen.

I'm still waiting for anybody to imagine any reason why we might want post-udpate-branch.

-- 
Felipe Contreras
Previous: Junio C HamanoNext: Junio C Hamano
Message 24 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.