Re: range-diff should suppress context-only changes?

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

 



> > I wonder if it would be reasonable to suppress range-diff hunks in which
> > all of the changed lines are context lines.
> 
> Sounds like a reasonable thing to do.  As we know the shape of what
> is compared in the outer diff we should be able to accurately notice
> where hunk boundaries are and a hunk whose change is only on context
> lines.

Here are patches to ignore context-only changes in range-diff's output.
I'm not completely happy with the changes, they feel a bit too hacky.
Maybe someone has better ideas.

This still gives output like this one, that could be improved in future

	1:  7a3dac8 ! 1:  119bc78 Change
	    @@ some-other-file
	      7
	      8
	      9
	    - Old context line
	    + New context line

	    -## file ##
	    +## file => renamed-file ##
	     @@
	      1
	     -2


I think it should be

	1:  7a3dac8 ! 1:  119bc78 Change
	    -## file ##
	    +## file => renamed-file ##
	     @@
	      1
	     -2

I'm not sure if this is a feasible improvement.

"## <filename> ##" normally is a diff
section header (hence the "@@ some-other-file" hunk above) but here the
section header itself is changed..





[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