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

Re: [PATCH 1/2] config: improve error message for boolean config

From
Jeff King <peff@peff.net>
Date
Sep 18, 2020, 18:10 UTC
Message-ID
<20200918181026.GA187490@coredump.intra.peff.net>
In-Reply-To
<689d84672422dd96d1eb89ea6137e79ce4030248.1600395427.git.gitgitgadget@gmail.com>
On Fri, Sep 18, 2020 at 02:17:06AM +0000, Andrew Klotz via GitGitGadget wrote:
Show 11 quoted lines
> diff --git a/t/t0205-gettext-poison.sh b/t/t0205-gettext-poison.sh
> index f9fa16ad83..b66d34c6f2 100755
> --- a/t/t0205-gettext-poison.sh
> +++ b/t/t0205-gettext-poison.sh
> @@ -33,7 +33,7 @@ test_expect_success 'eval_gettext: our eval_gettext() fallback has poison semant
>  
>  test_expect_success "gettext: invalid GIT_TEST_GETTEXT_POISON value doesn't infinitely loop" "
>  	test_must_fail env GIT_TEST_GETTEXT_POISON=xyz git version 2>error &&
> -	grep \"fatal: bad numeric config value 'xyz' for 'GIT_TEST_GETTEXT_POISON': invalid unit\" error
> +	grep \"fatal: bad boolean config value 'xyz' for 'GIT_TEST_GETTEXT_POISON'\" error
>  "

This test is pretty subtle and depends on gettext-poison's inner workings. I wonder if it's worth adding a separate:

  git config --bool --default=foo does.not.exist
test in t1300 or similar.
-Peff
Previous: Andrew Klotz via GitGitGadgetNext: Phillip Wood
Message 3 of 13 in “config: improve error message for boolean config”
  1. 0/2 config: improve error message for boolean configAndrew Klotz via GitGitGadget, Sep 18, 2020
  2. 1/2 config: improve error message for boolean configAndrew Klotz via GitGitGadget, Sep 18, 2020
  3. Jeff KingSep 18, 2020
  4. Phillip WoodSep 18, 2020
  5. Junio C HamanoSep 18, 2020
  6. 2/2 formatting for error messagesAndrew Klotz via GitGitGadget, Sep 18, 2020
  7. Junio C HamanoSep 18, 2020
  8. config: improve error message for boolean configAndrew Klotz via GitGitGadget, Feb 9, 2021
  9. Jeff KingFeb 9, 2021
  10. Junio C HamanoFeb 9, 2021
  11. config: improve error message for boolean configAndrew Klotz via GitGitGadget, Feb 11, 2021
  12. Jeff KingFeb 12, 2021
  13. Junio C HamanoFeb 12, 2021

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.