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

Re: [PATCH] buitin_config: return postitive status in get_value

From
NVNikolay Vladimirov <nikolay@vladimiroff.com>
Date
Jul 28, 2012, 13:18 UTC
Message-ID
<CAJg5NvdAq_zEx2phVGS4EiUfqMtFJA2Bo=y1d3FJyWXtzMwCTw@mail.gmail.com>
In-Reply-To
<CACsJy8BUU13H1tRfTtUme_7u0Jf0upca31U-VNhXva_0R2MLoQ@mail.gmail.com>
On 28 July 2012 15:59, Nguyen Thai Ngoc Duy <pclouds@gmail.com> wrote:
Show 8 quoted lines
> I'm curious. Why is -1 (or 255) wrong? It was introduced in the first
> version of get_value in 4ddba79 (git-config-set: add more options -
> 2005-11-20). Back then it returned -1 when there's regex compile error
> to distinguish with 0 and 1 (but git-config-set.txt in the same commit
> did not get update about exit code). Maybe we should update document
> instead of the code.
> --
> Duy

That sounds great. But the behavior now seems kind of strange, or maybe I'm missing something: # git config foobar; echo $? error: key does not contain a section: foobar 255

# git config foobar.info; echo $? 1

git version 1.7.11.2
I would generally expect the both to behave the same way.
Previous: Nguyen Thai Ngoc DuyNext: Nguyen Thai Ngoc Duy
Message 3 of 10 in “buitin_config: return postitive status in get_value”
  1. buitin_config: return postitive status in get_valueNikolai Vladimirov, Jul 28, 2012
  2. Nguyen Thai Ngoc DuyJul 28, 2012
  3. Nikolay VladimirovJul 28, 2012
  4. Nguyen Thai Ngoc DuyJul 28, 2012
  5. Junio C HamanoJul 29, 2012
  6. Junio C HamanoJul 29, 2012
  7. Jeff KingJul 29, 2012
  8. Nguyen Thai Ngoc DuyJul 30, 2012
  9. Junio C HamanoJul 30, 2012
  10. Jeff KingJul 29, 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.