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

Re: [PATCH/RFC] Have git-cvsserver call hooks/update before really altering the ref

From
Junio C Hamano <junkio@cox.net>
Date
Feb 14, 2007, 09:33 UTC
Message-ID
<7vfy99t761.fsf@assigned-by-dhcp.cox.net>
In-Reply-To
<200702140913.55506.andyparkins@gmail.com>
Andy Parkins <andyparkins@gmail.com> writes:
Show 8 quoted lines
> On Wednesday 2007 February 14 05:36, Junio C Hamano wrote:
>
>> Everybody else seems to say 'print "error 1 blah blah"'.  Are
>> you sure "error 2 message" is Kosher protocol-wise?
>
> Oops.  No I'm not sure at all.  I hadn't noticed that was a protocol command; 
> I'd read it as being output to stderr which appears to be just commentary to 
> the CVS client.  I assume you don't want a patch just to correct that?

I did not even read the protocol when I wondered what that 2 vs 1 was, and I wanted to know what was the right thing to send to the client. In other words, I was lazy ;-)

`error ERRNO-CODE ` ' TEXT \n'
     The command completed with an error.  ERRNO-CODE is a symbolic
     error code (e.g. `ENOENT'); if the server doesn't support this
     feature, or if it's not appropriate for this particular message,
     it just omits the errno-code (in that case there are two spaces
     after `error').  Text is an error message such as that provided by
     strerror(), or any other message the server wants to use.  The
     TEXT is like the `M' response, in the sense that it is not
     particularly intended to be machine-parsed; servers may wish to
     print an error message with `MT' responses, and then issue a
     `error' response without TEXT (although it should be noted that
     `MT' currently has no way of flagging the output as intended for
     standard error, the way that the `E' response does).

I suspect Martin and Martyn chose 1 to match EPERM (I am looking at /usr/include/asm-generic/errno-base.h), and I think your new error case falls into EPERM category as well. Since your patch is currently queued in 'pu', I can just go ahead and fix it myself with "git commit --amend", but an Ack from down under would certainly be appreciated ;-).

Previous: Andy ParkinsNext: Martin Langhoff
Message 8 of 9 in “Have git-cvsserver call hooks/update before really altering the ref”
  1. Have git-cvsserver call hooks/update before really altering the refAndy Parkins, Feb 13, 2007
  2. Junio C HamanoFeb 13, 2007
  3. Nicolas PitreFeb 13, 2007
  4. Junio C HamanoFeb 13, 2007
  5. Andy ParkinsFeb 13, 2007
  6. Junio C HamanoFeb 14, 2007
  7. Andy ParkinsFeb 14, 2007
  8. Junio C HamanoFeb 14, 2007
  9. Martin LanghoffFeb 19, 2007

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.