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

git-http-backend: hook output not delivered to client

From
BJ Hargrave <bj@bjhargrave.com>
Date
Mar 6, 2010, 22:24 UTC
Message-ID
<3C07BFC0-BC5E-4901-A846-A337B5F1B8F4@bjhargrave.com>
I have compiled and installed git 1.7.0.1 on a RHEL4 box and am using Apache httpd with git-http-backend. I have developed a pre-receive hook to validate that incoming commits are from a list of committers. I have tested the hook and it correctly detects invalid committers, outputs error message and exits with a non-zero return code. 
If I push a commit from an invalid committer to a repo using ssh, the hook properly detects this. git-push displays the pre-receive hook's output messages and indicates the push failed.
However if I push a commit from an invalid committer to the repo using http (git-http-backend), the hook is run and detects the invalid committer but the output messages (stderr) end up in the httpd error log instead of being ferried back to git-push. git-push does exit with an error code but the user has no visible indication there was an error on the push. The git-push output look like everything went fine even though the push failed.
So the push properly fails in both cases because the hook exits with a non-zero return code, but it seems there is a problem with git-http-backend not ferrying the hook output messages back to the client. Has anyone seen this? Or have I some how configure the system wrong?
Thanks,
-- 
BJ Hargrave
Next: Shawn O. Pearce
Message 1 of 3 in “git-http-backend: hook output not delivered to client”
  1. BJ HargraveMar 6, 2010
  2. Shawn O. PearceMar 6, 2010
  3. BJ HargraveMar 6, 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.