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

Re: git config error message

From
Ben Walton <bdwalton@gmail.com>
Date
Oct 27, 2012, 08:45 UTC
Message-ID
<CAP30j15pUwX9sD3FXAfroxFK9paHmb1eAg+M5YAHT4aB22DBEw@mail.gmail.com>
In-Reply-To
<CAB9Jk9CONVSZvBUgnZHiniwPHHvcap8Wyjyw-sCHaSokDoNRWA@mail.gmail.com>

On Sat, Oct 27, 2012 at 9:32 AM, Angelo Borsotti <angelo.borsotti@gmail.com> wrote:

Hi Angelo,
> I wrote "value", but I meant "name". The first example I made contains
> a name with a nonexistent section, the second a name with a
> nonexistent key.

This still wouldn't be an error condition though, especially in terms of how "git config" should treat it. It should be up to the consumer of the information to display, or not, any error or diagnostics that don't result from either a bad request (your first case) or a malformed configuration file. This fits with the callback nature of how the config file is parsed by builtin tools. The exit code from "git config" with a missing key is enough for the consumer to make this decision.

This is just my take on it, but I think the current approach makes sense.

Thanks -Ben

-- 
---------------------------------------------------------------------------------------------------------------------------
Take the risk of thinking for yourself.  Much more happiness,
truth, beauty and wisdom will come to you that way.

-Christopher Hitchens
---------------------------------------------------------------------------------------------------------------------------
Previous: Andreas SchwabNext: Angelo Borsotti
Message 5 of 9 in “git config error message”
  1. Angelo BorsottiOct 27, 2012
  2. Andreas SchwabOct 27, 2012
  3. Angelo BorsottiOct 27, 2012
  4. Andreas SchwabOct 27, 2012
  5. Ben WaltonOct 27, 2012
  6. Angelo BorsottiOct 27, 2012
  7. Andreas SchwabOct 27, 2012
  8. Angelo BorsottiOct 27, 2012
  9. Andreas SchwabOct 27, 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.