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

Re: [PATCH 1/2] config: define and document exit codes

From
Michael J Gruber <git@drmicha.warpmail.net>
Date
May 17, 2011, 15:49 UTC
Message-ID
<4DD2990A.8070400@drmicha.warpmail.net>
In-Reply-To
<BANLkTikjY956f7LxXGY5fcLkJJDuMnt6OQ@mail.gmail.com>
Thiago Farina venit, vidit, dixit 17.05.2011 17:46:
Show 9 quoted lines
> On Tue, May 17, 2011 at 12:38 PM, Michael J Gruber
> <git@drmicha.warpmail.net> wrote:
>> The return codes of git_config_set() and friends are magic numbers right
>> in the source. #define them in cache.h where the functions are declared,
> 
> Why defining them on cache.h? Just because the functions are declared
> there? Is this a good reason? I think this pollute even more the
> cache.h and these constants are not used outside of config.c. So I'd
> move them back onto config.c. Maybe it's fine as is though.

Because, potentially, they are used by callers of these external functions. It's the interface declaration. And in fact, 2/2 creates such a use.

Michael
Previous: Thiago FarinaNext: Jeff King
Message 7 of 11 in “config: Give error message when not changing a multivar”
  1. config: Give error message when not changing a multivarMichael J Gruber, May 17, 2011
  2. Jeff KingMay 17, 2011
  3. Michael J GruberMay 17, 2011
  4. Jeff KingMay 17, 2011
  5. 1/2 config: define and document exit codesMichael J Gruber, May 17, 2011
  6. Thiago FarinaMay 17, 2011
  7. Michael J GruberMay 17, 2011
  8. Jeff KingMay 18, 2011
  9. Junio C HamanoMay 18, 2011
  10. Michael J GruberMay 18, 2011
  11. 2/2 config: Give error message when not changing a multivarMichael J Gruber, May 17, 2011

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.