Re: [PATCH] xdiff: unignore changes in function context

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Dec 05, 2019 at 09:29:46AM -0800, Junio C Hamano wrote:

> > -# Note that the "6" in the expected hunk header below is funny, since we only
> > -# show 5 lines (the missing one was blank and thus ignored). This is how
> > -# --ignore-blank-lines behaves even without --function-context, and this test
> > -# is just checking the interaction of the two features. Don't take it as an
> > -# endorsement of that output.
> 
> Nice to see that somebody anticipated that we may fix this some day.

Or that somebody just didn't want to be embarrassed by introducing such
obvious nonsense into the test suite. :)

I was curious, though, whether there was still a lurking bug in
"--ignore-blank-lines", based on what that comment says. But I don't
think so. It reports the correct numbers for this test case, but that's
because the blank line drops off the context. If we add -U4, then it
does mention 6 lines in the preimage, and includes the line.

Which matches what René claimed in the commit message: "Changes
involving only blank lines are hidden with --ignore-blank-lines, unless
they appear in the context lines of other changes." But now I've
double-checked. :)

(And I agree that the output after this patch is way better).

-Peff



[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux