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

Re: [PATCH 1/2] docs: add a basic description of the config API

From
Junio C Hamano <gitster@pobox.com>
Date
Feb 7, 2012, 18:44 UTC
Message-ID
<7vlioe1o1g.fsf@alter.siamese.dyndns.org>
In-Reply-To
<20120207180625.GA27189@sigill.intra.peff.net>
Jeff King <peff@peff.net> writes:
Show 15 quoted lines
>> > +A config callback should return 0 for success, or -1 if the variable
>> > +could not be parsed properly.
>> 
>> This matches what I have always thought, but I think I recently saw a
>> series that adds callbacks that return 1 to mean "I have understood this
>> variable, so callers should not look at it any more".  It felt wrong, but
>> I did not find anything in the config.c API framework to prvent such a
>> local calling convention.
>
> ...
> The "1 means I understood this" convention is used by userdiff_config. I
> don't like that it is unlike every other config callback,...
> Looking at the code again, though, ...
> Hmm. Yeah. The userdiff calling convention dates back to late 2008....
> So I think we could go back and simplify the userdiff_config code now.

I remembered where I saw the new "offender"; it was nd/columns topic (Cc'ing Nguyễn).

Previous: Junio C HamanoNext: Nguyen Thai Ngoc Duy
Message 7 of 16 in “config includes 3: revenge of the killer includes”
  1. 0/2 config includes 3: revenge of the killer includesJeff King, Feb 6, 2012
  2. 1/2 docs: add a basic description of the config APIJeff King, Feb 6, 2012
  3. Junio C HamanoFeb 6, 2012
  4. Jeff KingFeb 7, 2012
  5. Jeff KingFeb 7, 2012
  6. Junio C HamanoFeb 7, 2012
  7. Junio C HamanoFeb 7, 2012
  8. Nguyen Thai Ngoc DuyFeb 8, 2012
  9. Junio C HamanoFeb 8, 2012
  10. Nguyen Thai Ngoc DuyFeb 8, 2012
  11. Jeff KingFeb 8, 2012
  12. Jeff KingFeb 8, 2012
  13. Jeff KingFeb 7, 2012
  14. 2/2 config: add include directiveJeff King, Feb 6, 2012
  15. Junio C HamanoFeb 6, 2012
  16. Jeff KingFeb 7, 2012

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.