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

Re: Is there any way to make hooks part of the repository?

From
HWHilco Wijbenga <hilco.wijbenga@gmail.com>
Date
May 2, 2012, 00:18 UTC
Message-ID
<CAE1pOi2Gj-8fRhaUMmwhCDTLp27ETKeaExvm7iHz8HpObY8O+A@mail.gmail.com>
In-Reply-To
<CA+7g9JzvN+5RsSF+bRFtaMafZeY+TyFkXeq-6OSAW3qJ99JqKg@mail.gmail.com>
On 1 May 2012 17:10, Nathan Gray <n8gray@n8gray.org> wrote:
Show 28 quoted lines
> On Tue, May 1, 2012 at 3:21 PM, Hilco Wijbenga <hilco.wijbenga@gmail.com> wrote:
>> On 1 May 2012 14:59, PJ Weisberg <pj@irregularexpressions.net> wrote:
>>> On Tue, May 1, 2012 at 2:09 PM, Hilco Wijbenga <hilco.wijbenga@gmail.com> wrote:
>>>
>>>> On 1 May 2012 14:03, Junio C Hamano <gitster@pobox.com> wrote:
>>>>
>>>>> We've talked about something like that a few times in the past, but as far
>>>>> as I (am concerned / remember) the conclusion has always been that is not
>>>>> worth "standardizing", i.e. nothing a ./setup script in-tree or a Makefile
>>>>> target cannot offer the same convenience.
>>>>
>>>> This would not keep things up-to-date, though, would it? It seems like
>>>> yet another thing developers need to remember and do. I would prefer
>>>> something more automatic.
>>>
>>> Once your hooks are installed, couldn't your post-checkout and
>>> post-merge hooks keep all the others up to date?
>>
>> Excellent point. Yes, that would certainly work.
>
> But beware, this has the effect of making your hooks
> version-dependent.  Check out a different branch and you can
> potentially end up with a different hook.
>
> IMHO things like this belong in a separate "admin" repo -- policy may
> change over time, but going back to an old version of your code
> shouldn't take you back to a correspondingly old version of your
> policy.

You have a point, of course, however, checking out an older version (that does not comply with current policy) should not break (when interacting with Git) just because of that. So I think there is at least some justification to version the policy as well.

This is something we will simply have to experience to see what works best.
Previous: Nathan GrayNext: Hilco Wijbenga
Message 9 of 18 in “Is there any way to make hooks part of the repository?”
  1. Hilco WijbengaMay 1, 2012
  2. Junio C HamanoMay 1, 2012
  3. Randal L. SchwartzMay 1, 2012
  4. Junio C HamanoMay 1, 2012
  5. Hilco WijbengaMay 1, 2012
  6. PJ WeisbergMay 1, 2012
  7. Hilco WijbengaMay 1, 2012
  8. Nathan GrayMay 2, 2012
  9. Hilco WijbengaMay 2, 2012
  10. Hilco WijbengaMay 1, 2012
  11. Hilco WijbengaMay 1, 2012
  12. Matthieu MoyMay 2, 2012
  13. Hilco WijbengaMay 2, 2012
  14. Junio C HamanoMay 2, 2012
  15. Hilco WijbengaMay 2, 2012
  16. Thomas RastMay 3, 2012
  17. Hilco WijbengaMay 3, 2012
  18. Johan HerlandMay 4, 2012

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.