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

Re: Unable to coax hooks into working

From
Jeremiah Foster <jeremiah.foster@pelagicore.com>
Date
Apr 27, 2010, 09:08 UTC
Message-ID
<EA3DE148-CDC8-4FA3-8C97-74379E91B495@pelagicore.com>
In-Reply-To
<4BD6A5BC.3010708@drmicha.warpmail.net>
On Apr 27, 2010, at 10:52 AM, Michael J Gruber wrote:
Show 23 quoted lines
> Jeremiah Foster venit, vidit, dixit 27.04.2010 10:33:
>> 
>> On Apr 26, 2010, at 8:11 PM, Jacob Helwig wrote:
>>> 
>>> You want one of the receive, or update hooks, if you're putting
>>> this in a central place, where it needs to be triggered by someone
>>> doing a push in to the repo.
>> 
>> Thanks Jacob. I'd just like to confirm that I am, in fact, using the
>> update hook. I logged into the server holding the git repo, cd'd to
> 
> That used to be different ;) update hook on the server is good.
> 
>> the .git/hooks/ directory. Moved the update.sample to update. Changed
>> the code to something trivial that would echo back to the client for
>> testing. I checked permissions, checked ownership, ran the code as
>> the git repo owner. I logged out, did a trivial change in the client
>> repo, ran git commit -a -m "foo" and expected that the trivial update
>> script to run on the server would produce output to the client. This
> 
> But this is the same problem backwards. Again: Please try to understand
> what commit does, and what push does, in terms of where (local repo vs.
> server) a change happens:
I think I do. The commit pushes the change onto the index. The index is local. It gets pushed to the remote server when I do a git push. I should have been more explicit - I am in fact pushing the code to the remote server in such a manner that git-receive-pack is run. My understanding from the documentation is that this is the trigger which update gets called. Yet no information from that update script is produced in the logs or in the client.
Show 10 quoted lines
> 
> As long as you only commit in your local repo nothing changes on the
> server (remote repo), so no hook is triggered there.
> 
>> never occurred. I further tested the client hooks which also did not
>> run.
> 
> Which ones?
> 
> committing locally triggers post-commit on your local repo.
These did not work.
> pushing to remote triggers post-update (and others) on the remote
> server's repo.
These also did not work. In short, the triggers that the documentation defines for both client and remote hooks fail to produce information in the client. Any idea on why?
Jeremiah
Previous: Michael J GruberNext: Michael J Gruber
Message 5 of 6 in “Re: Unable to coax hooks into working”
  1. Jeremiah FosterApr 26, 2010
  2. Jacob HelwigApr 26, 2010
  3. Jeremiah FosterApr 27, 2010
  4. Michael J GruberApr 27, 2010
  5. Jeremiah FosterApr 27, 2010
  6. Michael J GruberApr 27, 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.