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

Re: Adding custom hooks to a bare repository.

From
Johannes Schindelin <johannes.schindelin@gmx.de>
Date
Jul 28, 2008, 11:26 UTC
Message-ID
<alpine.DEB.1.00.0807281324350.2725@eeepc-johanness>
In-Reply-To
<18071eea0807280404w3365748cjcd11f536bf5d27eb@mail.gmail.com>
Hi,
On Mon, 28 Jul 2008, Thomas Adam wrote:
Show 7 quoted lines
> I'm trying to add in "post-merge" as a valid hook file to an already 
> created --bare repository.  In adding it to the correct place and 
> setting the correct permissions on it (the repository is a shared one), 
> it doesn't seem to be pulled down with the other hook files already 
> present when doing a "git clone".
> 
> Any ideas why?

Yes. Hooks, just as the config and reflogs, are supposed to be local things. Rationale being: it is rude, and also insecure, to install something that potentially calls other programs without the user saying so.

All you can do is checking in a copy of the hook, and ask your users/check in your build system that it is installed.

Hth, Dscho

Previous: Thomas AdamNext: Thomas Adam
Message 2 of 5 in “Adding custom hooks to a bare repository.”
  1. Thomas AdamJul 28, 2008
  2. Johannes SchindelinJul 28, 2008
  3. Thomas AdamJul 28, 2008
  4. Johannes SchindelinJul 28, 2008
  5. Thomas AdamJul 28, 2008

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.