All of lore.kernel.org
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Jeff King <peff@peff.net>
Cc: git@vger.kernel.org, christian.couder@gmail.com,
	jacob.e.keller@intel.com
Subject: Re: [PATCH v2 5/7] diff: use skip-to-optional-val in parsing --relative
Date: Thu, 07 Dec 2017 14:31:38 -0800	[thread overview]
Message-ID: <xmqqlgieb25x.fsf@gitster.mtv.corp.google.com> (raw)
In-Reply-To: <20171207222143.GA14845@sigill.intra.peff.net> (Jeff King's message of "Thu, 7 Dec 2017 17:21:43 -0500")

Jeff King <peff@peff.net> writes:

> On Thu, Dec 07, 2017 at 01:59:39PM -0800, Junio C Hamano wrote:
>
>> Jeff King <peff@peff.net> writes:
>> 
>> > On Thu, Dec 07, 2017 at 09:30:32AM -0800, Junio C Hamano wrote:
>> >
>> >> Signed-off-by: Junio C Hamano <gitster@pobox.com>
>> >> ---
>> >
>> > It might be worth mentioning why this conversion is pulled out from the
>> > others (because its "default" case is "do not touch the pointer").
>> 
>> I am not sure what you mean by "pulled out from the others".  I did
>> not intend to keep these 3 additional patches permanently; rather, I
>> did them to help Christian's rerolling the series, and I do not think
>> this one should be separate from other ones that use the _default()
>> variant when that happens.
>
> Ah, I see. I had thought you meant these to be applied on top.

Ah, I do not particularly mind doing things incrementally, either.

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.  

The reason why _default() variant exists is because its callers want
to react differently to "--foo" from the way they react to "--foo="
(with an empty string as its value), and from that point of view,
this caller is not all that different from other ones, like the one
that parses --color-words Christian wrote in his initial round.


  reply	other threads:[~2017-12-07 22:31 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-12-07  0:35 [PATCH] diff: add test showing regression to --relative Jacob Keller
2017-12-07  1:04 ` Jeff King
2017-12-07  1:21   ` Jacob Keller
2017-12-07 17:30 ` [PATCH v2 0/7] reroll of cc/skip-to-optional-val Junio C Hamano
2017-12-07 17:30   ` [PATCH v2 5/7] diff: use skip-to-optional-val in parsing --relative Junio C Hamano
2017-12-07 19:03     ` Jacob Keller
2017-12-07 21:11     ` Jeff King
2017-12-07 21:59       ` Junio C Hamano
2017-12-07 22:21         ` Jeff King
2017-12-07 22:31           ` Junio C Hamano [this message]
2017-12-08  9:05             ` Jeff King
2017-12-08 21:09               ` Junio C Hamano
2017-12-07 17:30   ` [PATCH v2 6/7] t4045: reindent to make helpers readable Junio C Hamano
2017-12-07 17:30   ` [PATCH v2 7/7] t4045: test 'diff --relative' for real Junio C Hamano
2017-12-07 19:06     ` Jacob Keller

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=xmqqlgieb25x.fsf@gitster.mtv.corp.google.com \
    --to=gitster@pobox.com \
    --cc=christian.couder@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=jacob.e.keller@intel.com \
    --cc=peff@peff.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.