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

Re: [PATCH] config.c: avoid segfault with --fixed-value and valueless config

From
Taylor Blau <me@ttaylorr.com>
Date
Aug 5, 2024, 19:46 UTC
Message-ID
<ZrEsIhWTgkdNn3I/@nand.local>
In-Reply-To
<xmqqa5hr55yb.fsf@gitster.g>
On Mon, Aug 05, 2024 at 08:45:32AM -0700, Junio C Hamano wrote:
Show 14 quoted lines
> Patrick Steinhardt <ps@pks.im> writes:
>
> > Edge cases like this really make me wonder what the benefit of implicit
> > bools is in our config files.
> >
> > So... why do we have them in the first place? Is there even a single
> > good reason?
>
> There isn't any good reason to introduce such a syntax if we were
> desigining the configuration file format from scratch.  It was added
> because originally Linus thought it was a cute syntax, and these
> days a lot lot more importantly, it is kept working because you will
> break a lot of existing configuration files that were hand tweaked
> if you remove the support suddenly.

I agree. It's perhaps interesting to think about in the context of the discussion in [1], but I think also worth having some perspective above.

Sure, this configuration syntax would not be invented anew today, but I also don't think it's worth breaking existing configurations, even in a hypothetical "Git 3.0" release.

In some sense I am sympathetic to Patrick's argument, but I also think that having a bug in a relatively niche feature like --fixed-value that wasn't noticed for almost four years over 17 [2] releases isn't itself a strong argument for removing the feature.

Thanks, Taylor

[1]: <fc1a9fa03de7330f79dc56b0f2712834cb236b5a.1715070296.git.ps@pks.im> [2]: $ git tag --contains c90702a1f6 'v2.*.0' | wc -l

Previous: Junio C HamanoNext: Patrick Steinhardt
Message 4 of 5 in “config.c: avoid segfault with --fixed-value and valueless config”
  1. config.c: avoid segfault with --fixed-value and valueless configTaylor Blau, Aug 1, 2024
  2. Patrick SteinhardtAug 5, 2024
  3. Junio C HamanoAug 5, 2024
  4. Taylor BlauAug 5, 2024
  5. Patrick SteinhardtAug 6, 2024

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.