Re: [PATCH] diff: add --ignore-blank-lines option
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Jun 10, 2013, 21:43 UTC
- Message-ID
- <7vsj0pej5s.fsf@alter.siamese.dyndns.org>
- In-Reply-To
- <CALWbr2zLTUYRnaYxbjyU80zpa3Q6WGcquTPAHqWCJnbEZ7RNPQ@mail.gmail.com>
Antoine Pelisse <apelisse@gmail.com> writes:
Show 10 quoted lines
> On Sun, Jun 9, 2013 at 10:07 PM, Junio C Hamano <gitster@pobox.com> wrote: >> When any ignore blank option is used, there will be lines that >> actually has changes (hence should be shown with +/-) but we >> deliberately ignore their changes (hence, if they ever appear in the >> hunk, they do so as context lines prefixed with SP not +/-). When >> we do so, we show the lines from the postimage in the context. > > Don't we actually use preimage (see below) ? I think using pre-image > allows the patch to be applicable to another tree (but ignoring the > space changes).
But the result of such patch application is not usually what you want to use. If we use postimage (which by the way was a deliberate design decision we made earlier), at least the review of the patch is easier because you would see the end result more clearly.
> If we actually hide new blank lines that are in the context, it means > that we won't be able to apply a patch with 2 new blank lines in the 3 > line context.
Yes, but I do not think the point of --ignore-blank-lines is to produce a patch that can be applied in the first place. It is to allow easier eyeballing.
> Anyway, I'm starting to think that "show blank lines changes near > other changes" makes sense more and more sense.
Probably.