On Wed, Jun 26, 2013 at 11:51 AM, Stefan Sperling <s...@elego.de> wrote: > On Tue, Jun 25, 2013 at 11:20:02PM +0200, Ben Reser wrote: ... >> > Johan pointed out that svnlook diff seems to traverse to the copyfrom >> > source even in case 2). If this is indeed the case, these commands are >> > now behaving in contradictory ways :( However, I think it's too late >> > to change either command now. >> >> I'd call that a bug and fix it. In this case I'd probably make >> svnlook match svn and fix svn diff --git to provide the behavior >> because of what I mentioned before. svnlook should probably also grow >> --git and some of the other diff options. > > Consistency is good. Generally, I won't object to such changes being made. > But I'd be careful about changing this output in a patch release. > We can change it in 1.9, of course, and document the change > > I would prefer adding a --diff-copy-from option for 'svn diff', > to make it match the current 'svnlook diff' behaviour:
As said in my previous post in this thread (and in the old thread it refers), I thought once that --show-copies-as-adds (option of 'svn diff') had actually the inverse meaning of --diff-copy-from (option of 'svnlook diff'). Is that or is that not the case? I.e., given those existing options, I would have thought that 'svn diff', without any options, always does the diff against the copy source (the --diff-copy-from behavior), and that you had to explicitly tell it to show the copies as adds with the --show-copies-as-adds option. And 'svnlook diff' always shows the full add, unless you pass it the option --diff-copy-from. As Tobias pointed out, 'svn diff' does indeed do the diff against the copy source, but *only if you're lucky*. I would consider this erratic behavior definitely a bug, because it makes the output unpredictable, and thus unusable in general. So, if my above understanding is correct, there is no need for any more options. We "just" need to correct the default behavior of 'svn diff' regarding copy source, to make it work like 'svnlook diff --diff-copy-from' and like 'svn diff --feeling-lucky'. The 'show the entire copied file as an add' behavior is still available with the --show-copies-as-adds option (implicit in the --patch-compatible option), which seems to be the way it's designed. Right? (I have no objection on trying to achieve consistency between 'svn diff' and 'svnlook diff', but it seems superfluous to add an option --diff-copy-from, when you already have an option --show-copies-as-adds which seems to mean the exact opposite --- what's the behavior then if you add neither option? Or both?) -- Johan