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

Re: Unable to coax hooks into working

From
Michael J Gruber <git@drmicha.warpmail.net>
Date
Apr 26, 2010, 12:55 UTC
Message-ID
<4BD58D35.1010307@drmicha.warpmail.net>
In-Reply-To
<4C764DDD-420E-40C6-9848-96E2197BE70D@pelagicore.com>
Jeremiah Foster venit, vidit, dixit 26.04.2010 14:32:
Show 9 quoted lines
> Hello,
> 
> 	After reading this page: http://book.git-scm.com/5_git_hooks.html on git hooks and doing a test implementation, I cannot seem to coax my git hooks into working.
> 
> 	My understanding is that the hook is in the right location, in the git repository on the remote server, when doing a hook based on a post-commit update. I have down chown and chmod, the code executes, it just doesn't execute when I update the git repo and push. I have also tested this on the local machine with a different hook for the client also without success. 
> 
> 	We're using debian testing and git 1.7.0.2 with the http-smart backend.
> 
> 	What should I do to get hooks working?
Use the right hook.

Unsurprisingly, the post-commit hook is executed after a commit. That should give you an indication that the hook should be in the repo where you commit. Reading the page you linked to confirms this guess. I refrain from comments related to the "smart backend" ;)

Michael
Previous: Jeremiah FosterNext: Jeremiah Foster
Message 2 of 3 in “Unable to coax hooks into working”
  1. Jeremiah FosterApr 26, 2010
  2. Michael J GruberApr 26, 2010
  3. Jeremiah FosterApr 26, 2010

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.