Re: [RFC PATCH] xdiff/xpatience: support anchoring a line
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Nov 22, 2017, 02:27 UTC
- Message-ID
- <xmqqwp2jvyhc.fsf@gitster.mtv.corp.google.com>
- In-Reply-To
- <20171121221717.155301-1-jonathantanmy@google.com>
Jonathan Tan <jonathantanmy@google.com> writes:
Show 12 quoted lines
> Teach the patience diff to support prohibiting a user-specified line > from appearing as a deletion or addition in the end result. > > Signed-off-by: Jonathan Tan <jonathantanmy@google.com> > --- > I'm sending this out to see if a change similar to this would be > welcome. It is useful to me as a reviewer (to check my own code, e.g. > when checking [1]). Probably more design needs to go into this, > including the best way to specify the "anchor" line, and the correct > behavior when the anchor is either not found or appears more than once. > > Any thoughts?
This is a natural extension of the idea the patience algorithm is built upon. If this were a cumulative command line option that can be given to specify multiple lines and can be used across the diff family, it would make a welcome addition, I would think.