From: Junio C Hamano <gitster@pobox.com>
To: Jonathan Tan <jonathantanmy@google.com>
Cc: git@vger.kernel.org, sbeller@google.com
Subject: Re: [PATCH] xdiff/xpatience: support anchoring line(s)
Date: Thu, 23 Nov 2017 11:47:02 +0900 [thread overview]
Message-ID: <xmqqh8tlr9sp.fsf@gitster.mtv.corp.google.com> (raw)
In-Reply-To: <xmqq3755sprp.fsf@gitster.mtv.corp.google.com> (Junio C. Hamano's message of "Thu, 23 Nov 2017 11:16:42 +0900")
Junio C Hamano <gitster@pobox.com> writes:
> What do we do when
>
> git diff --histogram --patience
>
> is given? Do we warn? If we don't, perhaps it may not be too bad
> if
>
> git diff --histogram --patience-anchor=foo
> git diff --patience-anchor=foo --histogram
>
> did not get any warning. Instead we just implicitly turn any
> occurence of --patience-anchor=foo into --patience followed by the
> same option, and assume that the user wanted the usual "last one
> wins" semantics. It would turn patience on for the former, and
> ignore the anchor for the latter and use historgram.
Thinking about this a bit more, I do like the basic idea of the UI
even better. What we could do is to sell this to the end users as a
new kind of diff algorithm choice (i.e. myers, patience, ... will
gain a new friend) that internally happens to be implemented by
piggybacking on patience (just like minimal is piggybacking on
myers) and call it "anchor". Then just like this command line
git diff --histogram --patience
makes the last one win without complaint, it is sane that these
command lines
git diff --histogram --anchored=<pattern>
git diff --anchored=<pattern> --histogram
make the last one win without complaint, either.
Hmm?
next prev parent reply other threads:[~2017-11-23 2:47 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-11-21 22:17 [RFC PATCH] xdiff/xpatience: support anchoring a line Jonathan Tan
2017-11-21 23:28 ` Stefan Beller
2017-11-22 2:27 ` Junio C Hamano
2017-11-22 23:41 ` [PATCH] xdiff/xpatience: support anchoring line(s) Jonathan Tan
2017-11-23 0:15 ` Stefan Beller
2017-11-23 2:05 ` Junio C Hamano
2017-11-23 2:16 ` Junio C Hamano
2017-11-23 2:47 ` Junio C Hamano [this message]
2017-11-27 18:30 ` Jonathan Tan
2017-11-27 19:47 ` [PATCH v2] diff: " Jonathan Tan
2017-11-28 1:38 ` Junio C Hamano
2017-11-28 18:47 ` [PATCH v3] " Jonathan Tan
2017-11-30 0:36 ` Johannes Schindelin
2017-11-30 23:26 ` Jonathan Tan
2017-12-04 19:45 ` Stefan Beller
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=xmqqh8tlr9sp.fsf@gitster.mtv.corp.google.com \
--to=gitster@pobox.com \
--cc=git@vger.kernel.org \
--cc=jonathantanmy@google.com \
--cc=sbeller@google.com \
/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.