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

Re: Git hooks are not called over HTTP

From
Jakub Narebski <jnareb@gmail.com>
Date
Oct 17, 2008, 09:22 UTC
Message-ID
<m38wsnk24l.fsf@localhost.localdomain>
In-Reply-To
<7beb12420810162323o6dce0a71r897fbed9b9d3e417@mail.gmail.com>
"KwangYul Seo" <kwangyul.seo@gmail.com> writes:
Show 7 quoted lines
> I have setup a git repository with post-receive and post-update
> enabled. I configured hooks.envelopesender and hooks.mailinglist. I
> confirmed that it works fine with push from local repositories.
> However, hooks are never called when push is done over HTTP. I added
> 'echo abc' to post-receive to see if it is called or not. With local
> push, abc was printed, but with HTTP push it was not printed. What is
> the problem here?

The "problem" here (which is very much the way HTTP protocol was designed) is that it isn't _git_ that updates repository on remote side on push (which knows about hooks), but _web server_ via WebDAV. And web server knows nothing about hooks.

Perhaps that would get improved when "smart" HTTP protocol gets implemented (currently in the phase of design, I think just after designing protocol).

-- 
Jakub Narebski
Poland
ShadeHawk on #git
Previous: KwangYul SeoNext: Shawn O. Pearce
Message 2 of 3 in “Git hooks are not called over HTTP”
  1. KwangYul SeoOct 17, 2008
  2. Jakub NarebskiOct 17, 2008
  3. Shawn O. PearceOct 17, 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.