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

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

From
Ilya Bobyr <ilya.bobyr@gmail.com>
Date
Apr 22, 2014, 17:09 UTC
Message-ID
<5356A25D.1050001@gmail.com>
In-Reply-To
<5356996d12ede_3e5aed7308e5@nysa.notmuch>
On 4/22/2014 9:31 AM, Felipe Contreras wrote:
Show 17 quoted lines
> Stephen Leake wrote:
>> Felipe Contreras <felipe.contreras@gmail.com> writes:
>>
>>> Ilya Bobyr wrote:
>>>> On 4/21/2014 2:17 PM, Felipe Contreras wrote:
>>>>> Ilya Bobyr wrote:
>>>>>
>>>>>> Also, most have names that start with either "pre-" or "post-".
>>>>>> It seems reasonable for both "pre-update-branch" and
>>>>>> "post-update-branch" to exist.
>>>>> I don't see what would be the point in that.
>>>> Do you see the point in the other hooks doing that?
>>> Yes, there a reason for the existance of those hooks. Now tell me why would
>>> anybody use post-update-branch instead of pre-update-branch?
>> I have a branch which should always be recompiled on update;
>> post-update-branch would be a good place for that.
> And why would pre-update-branch not serve that purpose?

"pre-" hook could be used, but if the hooks is not supposed to prevent the operation, it seems reasonable to put it in the "post-" hook should one be available. For example, for clone and branch that would mean that that the branch sections are already created in .git/config, but for "pre-" hooks, should be find the right spot, configuration could probably be absent just yet.

I do not think that someone is objecting adding just the "pre-" hook first. But it seems unlikely that one can envision all the possible use cases to say that "post-" hook would never be useful.

Previous: Felipe ContrerasNext: Felipe Contreras
Message 11 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.