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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Junio C Hamano <gitster@xxxxxxxxx> writes:

> 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.
-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux