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

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

From
Jeff King <peff@peff.net>
Date
Jul 10, 2017, 07:32 UTC
Message-ID
<20170710073229.mwf7zufx3xmszkde@sigill.intra.peff.net>
In-Reply-To
<xmqq7ezi9h64.fsf@gitster.mtv.corp.google.com>
On Sun, Jul 09, 2017 at 12:57:07AM -0700, Junio C Hamano wrote:
Show 37 quoted lines
> Junio C Hamano <gitster@pobox.com> 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
> like
> 
>     [user] 
> 	name = astian
> 	name = gitster
> 
> makes user.name "gitster" while
> 
>     [user] 
> 	name = astian
>     [user]
> 	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.

FWIW, the use of "multivalued" here tickled my spider sense, too. I think when talking on the list we generally reserve "multivalued" for true "we expect this to be a list" variables. But the only mention of "multivalued" in the config documentation seems to be:

  Some variables may appear multiple times; we say then that the
  variable is multivalued.

I think the proposed use is consistent with that (and that line is only 2 paragraphs above the proposed paragraph).

-Peff
Previous: Junio C HamanoNext: Junio C Hamano
Message 5 of 10 in “Misc. documentation fixes”
  1. 0/4 Misc. documentation fixesastian, Jul 8, 2017
  2. 1/4 Doc/config.txt: explain repeated sectionsastian, Jul 8, 2017
  3. Junio C HamanoJul 8, 2017
  4. Junio C HamanoJul 9, 2017
  5. Jeff KingJul 10, 2017
  6. Junio C HamanoJul 10, 2017
  7. 2/4 Doc/config.txt: fix typosastian, Jul 8, 2017
  8. 3/4 Doc/git-send-email.txt: clarify a couple of optionsastian, Jul 8, 2017
  9. 4/4 Doc/config.txt: fix documentation for smtpEncryptionastian, Jul 8, 2017
  10. Junio C HamanoJul 8, 2017

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.