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

Feature request: hooks directory

From
WSWesley Schwengle <wesley@mintlab.nl>
Date
Aug 30, 2018, 13:20 UTC
Message-ID
<CAEpdsiYHri8FJ8VohnwxmPwDM4-0J4J9Zb9wTZjYYRnYqsb=nA@mail.gmail.com>
Hello all,

I would like to ask if it is worth my time looking into the following solution to a problem we have at work.

Problem: We want to have some git-hooks and we want to provide them to the user. In a most recent example we have a post-checkout hook that deals with some Docker things. However, if we update that post-checkout hook my local overrides in that post-checkout hook are going to be overwritten.

Solution: We discussed this at work and we thought about making a .d directory for the hooks, eg. $GIT_DIR/hooks/post-commit.d, where a user can put the post-commit hooks in. This allows us to provide post commit hooks and allows the user to add additional hooks him/herself. We could implement this in our own code base. But we were wondering if this approach could be shared with the git community and if this behavior is wanted in git itself.

Cheers, Wesley

-- 
Wesley Schwengle, Developer
Mintlab B.V., https://www.zaaksysteem.nl
E: wesley@mintlab.nl
T:  +31 20 737 00 05
Next: Ævar Arnfjörð Bjarmason
Message 1 of 8 in “Feature request: hooks directory”
  1. Wesley SchwengleAug 30, 2018
  2. Ævar Arnfjörð BjarmasonAug 30, 2018
  3. Jonathan NiederAug 31, 2018
  4. Wesley SchwengleAug 31, 2018
  5. Ævar Arnfjörð BjarmasonAug 31, 2018
  6. Wesley SchwengleSep 2, 2018
  7. Christian CouderSep 3, 2018
  8. Wesley SchwengleSep 3, 2018

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.