{"thread":{"id":"15933","subject":"Git hooks are not called over HTTP","startedAt":"2008-10-17T06:23:52Z","lastAt":"2008-10-17T14:11:07Z","messageCount":3,"participants":["KwangYul Seo","Jakub Narebski","Shawn O. Pearce"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"93266","messageId":"7beb12420810162323o6dce0a71r897fbed9b9d3e417@mail.gmail.com","threadId":"15933","inReplyTo":null,"subject":"Git hooks are not called over HTTP","fromName":"KwangYul Seo","fromEmail":"kwangyul.seo@gmail.com","sentAt":"2008-10-17T06:23:52Z","receivedAt":"2008-10-17T06:23:52Z","isPatch":false,"sender":{"key":"kwangyul.seo@gmail.com","avatar":null},"body":"Hi,\n\nI have setup a git repository with post-receive and post-update\nenabled. I configured hooks.envelopesender and hooks.mailinglist. I\nconfirmed that it works fine with push from local repositories.\nHowever, hooks are never called when push is done over HTTP. I added\n'echo abc' to post-receive to see if it is called or not. With local\npush, abc was printed, but with HTTP push it was not printed. What is\nthe problem here?\n\nBTW, I use Ubuntu hardy.\n\nRegards,\nKwang Yul Seo\n"},{"id":"93281","messageId":"m38wsnk24l.fsf@localhost.localdomain","threadId":"15933","inReplyTo":"7beb12420810162323o6dce0a71r897fbed9b9d3e417@mail.gmail.com","subject":"Re: Git hooks are not called over HTTP","fromName":"Jakub Narebski","fromEmail":"jnareb@gmail.com","sentAt":"2008-10-17T09:22:06Z","receivedAt":"2008-10-17T09:22:06Z","isPatch":false,"sender":{"key":"jnareb@gmail.com","avatar":"https://avatars.githubusercontent.com/u/2706?v=4"},"body":"\"KwangYul Seo\" <kwangyul.seo@gmail.com> writes:\n\n> I have setup a git repository with post-receive and post-update\n> enabled. I configured hooks.envelopesender and hooks.mailinglist. I\n> confirmed that it works fine with push from local repositories.\n> However, hooks are never called when push is done over HTTP. I added\n> 'echo abc' to post-receive to see if it is called or not. With local\n> push, abc was printed, but with HTTP push it was not printed. What is\n> the problem here?\n\nThe \"problem\" here (which is very much the way HTTP protocol was\ndesigned) is that it isn't _git_ that updates repository on remote\nside on push (which knows about hooks), but _web server_ via WebDAV.\nAnd web server knows nothing about hooks.\n\nPerhaps that would get improved when \"smart\" HTTP protocol gets\nimplemented (currently in the phase of design, I think just after\ndesigning protocol).\n\n-- \nJakub Narebski\nPoland\nShadeHawk on #git\n"},{"id":"93294","messageId":"20081017141107.GE9877@spearce.org","threadId":"15933","inReplyTo":"m38wsnk24l.fsf@localhost.localdomain","subject":"Re: Git hooks are not called over HTTP","fromName":"Shawn O. Pearce","fromEmail":"spearce@spearce.org","sentAt":"2008-10-17T14:11:07Z","receivedAt":"2008-10-17T14:11:07Z","isPatch":false,"sender":{"key":"spearce@spearce.org","avatar":"https://avatars.githubusercontent.com/u/34844?v=4"},"body":"Jakub Narebski <jnareb@gmail.com> wrote:\n> \"KwangYul Seo\" <kwangyul.seo@gmail.com> writes:\n> \n> > I have setup a git repository with post-receive and post-update\n> > enabled. I configured hooks.envelopesender and hooks.mailinglist. I\n> > confirmed that it works fine with push from local repositories.\n> > However, hooks are never called when push is done over HTTP.\n> \n> Perhaps that would get improved when \"smart\" HTTP protocol gets\n> implemented (currently in the phase of design, I think just after\n> designing protocol).\n\nYes.  The Git-in-HTTP protocol for push basically calls for an\nembedding of send-pack/receive-pack's protocol into HTTP, and\nimplementation wise will probably be invoking git-receive-pack on\nthe web server side of the connection.  So if/when that finally\ngets implemented we'd run hooks over HTTP, but *ONLY* if both sides\nsupport the new Git-in-HTTP protocol.\n\nIf both sides are still using WebDAV, no hooks, for the reason you\ncited earlier.\n\n-- \nShawn.\n"}]}