The "examine stderr" was a bit tongue-in-cheek, i.e. solution which
would require least changes... but I guess very impractical.
I have thought that Git.pm API together with catching (and examining)
Error, perhaps with redirecting STDERR somewhere (but it would be best
if it would not be needed) would be enough.
If the source of error is some misconfiguration on server, then 5xx is
appropriate (for example git binary is not found, something which
perhaps we should check upfront at the beginning). But I think it
should be very, very rare, and result of misconfigured gitweb, or error
installing git... or corrupted repository.
If source of error is mistake in URL, I would certainly want 4xx error.
So the user knows that he/she has to look at the URL.
That said, perhaps I am worrying over nothing, and
or die_error(undef, "Open <git command> failed");
can happen only on some serious server error (like corrupted
repository).
From RFC 2616 (http://tools.ietf.org/html/rfc2616)
10.4 Client Error 4xx
The 4xx class of status code is intended for cases in which the
client seems to have erred.
[...]
10.5 Server Error 5xx
Response status codes beginning with the digit "5" indicate cases in
which the server is aware that it has erred or is incapable of
performing the request.
It is unfortunately very simple pattern based filter, not Markovian,
spam/ham Bayesian, or even simple Bayesian.
--
Jakub Narebski
Poland
--
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