On 2015-02-09 20:09:15 -0500, James McCoy wrote: > On Sun, Feb 08, 2015 at 07:19:14PM +0100, Vincent Lefevre wrote: > > Contrary to the "diff" utility, "svn diff" outputs 2 chunks instead > > of 1 when there are 6 consecutive unmodified lines. > > I don't think svn claims to produce identical diffs to that of the diff > command, so this is at most a minor issue, if not wishlist. > > Also, the diffs are functionally equivalent, so I'm not sure how this > matters other than the diffs being different.
Well, actually, what initially confused me with the "svn diff" output is that I thought that two output chunks were necessarily disjoint and non adjacent[*]. So, it seemed to me that there was a problem with my file, until I noticed that the chunks output by "svn diff" were adjacent. I hope that my bug report is more clear now. [*] AFAIK, this is always the case with GNU diff, and this is why I thought that this was a general rule for the unified diff format. Now, what's interesting is what POSIX says: http://pubs.opengroup.org/onlinepubs/9699919799/utilities/diff.html "If -U n is specified, the output shall contain no more than n consecutive unaffected lines; and if the output contains an affected line and this line is adjacent to up to n consecutive unaffected lines in the corresponding file, the output shall contain these unaffected lines. -u shall act like -U3." So, it appears that "svn diff" follows POSIX here (but it doesn't when there are exactly 5 consecutive unaffected lines). And GNU diff more generally doesn't follow POSIX, even though this page later says that the -u and -U options come from GNU diff! At least there is a lack of specification for "svn diff". But I think that a rule requiring disjoint and non adjacent chunks is intuitively better for a human reader. -- Vincent Lefèvre <vinc...@vinc17.net> - Web: <https://www.vinc17.net/> 100% accessible validated (X)HTML - Blog: <https://www.vinc17.net/blog/> Work: CR INRIA - computer arithmetic / AriC project (LIP, ENS-Lyon) -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org