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

Re: Review of git multimail

From
Junio C Hamano <gitster@pobox.com>
Date
Jul 3, 2013, 08:16 UTC
Message-ID
<7vzju4giss.fsf@alter.siamese.dyndns.org>
In-Reply-To
<51D3DA9A.9090604@alum.mit.edu>
Michael Haggerty <mhagger@alum.mit.edu> writes:
Show 5 quoted lines
> I would be happy to add the checking that you described, but I didn't
> have the impression that it is the usual convention.  Does code that
> wants a single value from the config usually verify that there is
> one-and-only-one value, or does it typically just do the equivalent of
> "git config --get" and use the returned (effectively the last) value?

In most cases, variables are "one value per key" and follow "the last one wins" rule, which is the reason why we read from the most generic to the most specific (i.e. $GIT_DIR/config is read last). For such uses, reading from "--get", and not from "--get-all", is absolutely the right thing to do.

But then as Ram said, there probably is not a need for --null; you can just read from textual "--get" to the end without any splitting (using splitlines is of course wrong if you do so).

Thanks.
Previous: Michael HaggertyNext: John Keeping
Message 6 of 15 in “Review of git multimail”
  1. Ramkumar RamachandraJul 2, 2013
  2. John KeepingJul 2, 2013
  3. Ramkumar RamachandraJul 2, 2013
  4. Junio C HamanoJul 2, 2013
  5. Michael HaggertyJul 3, 2013
  6. Junio C HamanoJul 3, 2013
  7. John KeepingJul 3, 2013
  8. John KeepingJul 3, 2013
  9. Michael HaggertyJul 3, 2013
  10. Ramkumar RamachandraJul 3, 2013
  11. Ramkumar RamachandraJul 3, 2013
  12. Michael HaggertyJul 3, 2013
  13. Jed BrownJul 3, 2013
  14. Matthieu MoyJul 4, 2013
  15. Michael HaggertyJul 4, 2013

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.