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

Re: [PATCH] connect.c: add a way for git-daemon to pass an error back to client

From
Shawn O. Pearce <spearce@spearce.org>
Date
Nov 1, 2008, 18:10 UTC
Message-ID
<20081101181035.GB14706@spearce.org>
In-Reply-To
<b97024a40810312329o53e37fd5td82aa69634ff1e6b@mail.gmail.com>
Tom Preston-Werner <tom@github.com> wrote:
Show 16 quoted lines
> 
> I saw several methods of testing for a specific prefix in connect.c.
> Looking more closely at the source, the closest similar call is
> actually the test for ACK:
> 
> 	if (!prefixcmp(line, "ACK ")) {
> 		if (!get_sha1_hex(line+4, result_sha1)) {
> 			if (strstr(line+45, "continue"))
> 				return 2;
> 			return 1;
> 		}
> 	}
> 
> Explicitly testing for "ERR " (including the space) does seem like the
> more correct thing to do. Would you like me to resubmit a modified
> patch that uses prefixcmp()?

Yes, I think that is what Junio was hinting at. The pattern above is much more typical in Git sources, so keeping the new "ERR " check consistent would be appreciated.

-- 
Shawn.
Previous: Tom Preston-WernerNext: Junio C Hamano
Message 12 of 13 in “connect.c: add a way for git-daemon to pass an error back to client”
  1. connect.c: add a way for git-daemon to pass an error back to clientTom Preston-Werner, Nov 1, 2008
  2. Johannes SchindelinNov 1, 2008
  3. Tom Preston-WernerNov 1, 2008
  4. Nicolas PitreNov 1, 2008
  5. Johannes SchindelinNov 1, 2008
  6. Tom Preston-WernerNov 1, 2008
  7. Andreas EricssonNov 1, 2008
  8. Alex RiesenNov 1, 2008
  9. Andreas EricssonNov 1, 2008
  10. Junio C HamanoNov 1, 2008
  11. Tom Preston-WernerNov 1, 2008
  12. Shawn O. PearceNov 1, 2008
  13. Junio C HamanoNov 1, 2008

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.