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

Re: [PATCH/RFC] ignore unknown color configuration

From
Jeff King <peff@peff.net>
Date
Dec 16, 2009, 03:46 UTC
Message-ID
<20091216034648.GB9742@sigill.intra.peff.net>
In-Reply-To
<7vy6l3vh8x.fsf@alter.siamese.dyndns.org>
On Tue, Dec 15, 2009 at 05:29:18PM -0800, Junio C Hamano wrote:
Show 8 quoted lines
> >  	if (!prefixcmp(k, "status.color.") || !prefixcmp(k, "color.status.")) {
> >  		int slot = parse_status_slot(k, 13);
> > +		if (slot < 0)
> > +			return -1;
> 
> Shouldn't this return 0, to say "we handled it (by ignoring), don't
> worry", instead of saying "hey it's error" by returning -1?  That's what
> is done on the "diff" side below...

Yes, thank you for catching it. It should definitely be "return 0" (as the other two cases are). It was a simple think-o on my part.

-Peff
Previous: Junio C Hamano
Message 8 of 8 in “ignore unknown color configuration”
  1. ignore unknown color configurationJeff King, Dec 12, 2009
  2. Junio C HamanoDec 12, 2009
  3. Jeff KingDec 12, 2009
  4. Junio C HamanoDec 14, 2009
  5. Junio C HamanoDec 16, 2009
  6. Jeff KingDec 16, 2009
  7. Junio C HamanoDec 16, 2009
  8. Jeff KingDec 16, 2009

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.