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

Re: [PATCH v2 5/7] diff: use skip-to-optional-val in parsing --relative

From
Junio C Hamano <gitster@pobox.com>
Date
Dec 8, 2017, 21:09 UTC
Message-ID
<xmqqindh6i64.fsf@gitster.mtv.corp.google.com>
In-Reply-To
<20171208090531.GC26199@sigill.intra.peff.net>
Jeff King <peff@peff.net> writes:
Show 14 quoted lines
> On Thu, Dec 07, 2017 at 02:31:38PM -0800, Junio C Hamano wrote:
>
>> If this goes on top as a standalone patch, then the reason why it is
>> separate from the other users of _default() is not because the way
>> it uses the null return is special, but because it was written by a
>> different author, I would think.
>
> Mostly I was just concerned that we missed a somewhat subtle bug in the
> first conversion, and I think it's worth calling out in the commit
> message why that callsite must be converted in a particular way. Whether
> that happens in a separate commit or squashed, I don't care too much.
>
> But I dunno. Maybe it is obvious now that the correct code is in there.
> ;)

It probably is too obvious to me only because the use case like this one that wanted to treat --foo and --foo="" differently was the only reason why I pushed against Christian's original one that hardcoded the equivalence without allowing what the _default() variant lets us do, I think.

Previous: Jeff King
Message 15 of 15 in “diff: add test showing regression to --relative”
  1. diff: add test showing regression to --relativeJacob Keller, Dec 7, 2017
  2. Jeff KingDec 7, 2017
  3. Jacob KellerDec 7, 2017
  4. 0/7 reroll of cc/skip-to-optional-valJunio C Hamano, Dec 7, 2017
  5. 6/7 t4045: reindent to make helpers readableJunio C Hamano, Dec 7, 2017
  6. 7/7 t4045: test 'diff --relative' for realJunio C Hamano, Dec 7, 2017
  7. Jacob KellerDec 7, 2017
  8. 5/7 diff: use skip-to-optional-val in parsing --relativeJunio C Hamano, Dec 7, 2017
  9. Jacob KellerDec 7, 2017
  10. Jeff KingDec 7, 2017
  11. Junio C HamanoDec 7, 2017
  12. Jeff KingDec 7, 2017
  13. Junio C HamanoDec 7, 2017
  14. Jeff KingDec 8, 2017
  15. Junio C HamanoDec 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.