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

Re: Alternative approach to the git config NULL value checking patches..

From
Junio C Hamano <gitster@pobox.com>
Date
Feb 10, 2008, 22:47 UTC
Message-ID
<7v7ihce8ex.fsf@gitster.siamese.dyndns.org>
In-Reply-To
<7vbq6oe98y.fsf@gitster.siamese.dyndns.org>
Junio C Hamano <gitster@pobox.com> writes:
Show 19 quoted lines
> But as you seem to imply, it might make sense to equate
>
> 	[some-random-section]
>         	some-random-variable
>
> to
>
> 	[some-random-section]
>         	some-random-variable = ""
>
> for variables that cannot possibly have any meaningful "bool"
> semantics.  This third class of variables is a possible benefit
> your patch brings in.  The code can be lax for these variables.
>
> However, it would make things inconsistent ("this variable is
> bool and the above two forms mean completely opposite things,
> while that variable is not bool and they mean the same thing").
> I am just having a hard time convincing myself that this little
> detail does not matter.

Having said all that, it might be an option to change your patch slightly to say:

	const char config_true[] = "true";
IOW, make
	[section]
        	var
equivalent to
	[section]
		var = "true"

Existing codepaths that deal with variables that were originally bool but now bool + more might get upset if we did so, though. An example I could think of offhand was "d7f4633 (Make AutoCRLF ternary variable" but that one is safe.

Previous: Junio C HamanoNext: Pierre Habouzit
Message 5 of 13 in “Alternative approach to the git config NULL value checking patches..”
  1. Linus TorvaldsFeb 10, 2008
  2. Junio C HamanoFeb 10, 2008
  3. Linus TorvaldsFeb 10, 2008
  4. Junio C HamanoFeb 10, 2008
  5. Junio C HamanoFeb 10, 2008
  6. Pierre HabouzitFeb 10, 2008
  7. Linus TorvaldsFeb 10, 2008
  8. Linus TorvaldsFeb 10, 2008
  9. Linus TorvaldsFeb 10, 2008
  10. Junio C HamanoFeb 11, 2008
  11. Christian CouderFeb 11, 2008
  12. Junio C HamanoFeb 11, 2008
  13. Daniel BarkalowFeb 11, 2008

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.