From: Junio C Hamano Date: Wed, 22 Nov 2017 02:27:59 GMT Subject: Re: [RFC PATCH] xdiff/xpatience: support anchoring a line Message-ID: In-Reply-To: <20171121221717.155301-1-jonathantanmy@google.com> Jonathan Tan writes: > 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 > --- > 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.