Web lists-archives.com

Re: [PATCH 1/4] Doc/config.txt: explain repeated sections

Junio C Hamano <gitster@xxxxxxxxx> writes:

>> +Multiple occurrences of the same section are all logically merged.  (There's
>> +no special treatment for variables defined multiple times across physically
>> +different sections, the variable is simply made multivalued.)
>> +
> Looks correct; it's a bit surprising that we didn't already mention
> multiple occurrences, but I do not find it so this is a good
> addition. 
> I do not see a strong reason for () around the second sentence,
> though.

After re-reading this, I am wondering if the "made multivalued"
above need to be made less confusing.  For a variable that is single
valued, the usual "the last one wins" rule is applied---it's not

	name = astian
	name = gitster

makes user.name "gitster" while

	name = astian
	name = gitster

makes user.name "multivalued".  In either case, the last one wins,
and it comes not from the syntax but from the semantics assigned to
the variable in question.  What we want to say is not "multi-valued",
but the above two forms both mean the same thing.

But perhaps I am needlessly worried about possible confusion too
much.  I dunno.