* git-http-backend: hook output not delivered to client
@ 2010-03-06 22:24 BJ Hargrave
2010-03-06 22:30 ` Shawn O. Pearce
0 siblings, 1 reply; 3+ messages in thread
From: BJ Hargrave @ 2010-03-06 22:24 UTC (permalink / raw)
To: git
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
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: git-http-backend: hook output not delivered to client
2010-03-06 22:24 git-http-backend: hook output not delivered to client BJ Hargrave
@ 2010-03-06 22:30 ` Shawn O. Pearce
2010-03-06 22:53 ` BJ Hargrave
0 siblings, 1 reply; 3+ messages in thread
From: Shawn O. Pearce @ 2010-03-06 22:30 UTC (permalink / raw)
To: BJ Hargrave; +Cc: git
BJ Hargrave <bj@bjhargrave.com> wrote:
> I have compiled and installed git 1.7.0.1 on a RHEL4 box
...
> 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.
Yes, we know about this problem.
You need commit 466dbc42f5 ("receive-pack: Send internal errors over
side-band #2") on both the client and the server for hook messages
to work over HTTP.
This hasnt been released yet. It is slated for 1.7.0.2.
--
Shawn.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: git-http-backend: hook output not delivered to client
2010-03-06 22:30 ` Shawn O. Pearce
@ 2010-03-06 22:53 ` BJ Hargrave
0 siblings, 0 replies; 3+ messages in thread
From: BJ Hargrave @ 2010-03-06 22:53 UTC (permalink / raw)
To: Shawn O. Pearce; +Cc: git
Thanks for the quick feedback. I will keep my eye out for 1.7.0.2.
--
BJ Hargrave
On Mar 6, 2010, at 17:30 , Shawn O. Pearce wrote:
> BJ Hargrave <bj@bjhargrave.com> wrote:
>> I have compiled and installed git 1.7.0.1 on a RHEL4 box
> ...
>> 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.
>
> Yes, we know about this problem.
>
> You need commit 466dbc42f5 ("receive-pack: Send internal errors over
> side-band #2") on both the client and the server for hook messages
> to work over HTTP.
>
> This hasnt been released yet. It is slated for 1.7.0.2.
>
> --
> Shawn.
> --
> To unsubscribe from this list: send the line "unsubscribe git" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2010-03-06 23:00 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-03-06 22:24 git-http-backend: hook output not delivered to client BJ Hargrave
2010-03-06 22:30 ` Shawn O. Pearce
2010-03-06 22:53 ` BJ Hargrave
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).