Browse Source

blame: Reuse existing blameEntireRegionOnParent method

Skipping directly to the parent is already possible with an existing
helper method. Update the source path (to follow the rename) and then
use the existing code path to push the parent inside the current entry.

Change-Id: Icb1d49e53d14b599efc478990613625a9e058e09
stable-3.4
Shawn Pearce 11 years ago
parent
commit
2d76133ba2
  1. 4
      org.eclipse.jgit/src/org/eclipse/jgit/blame/BlameGenerator.java

4
org.eclipse.jgit/src/org/eclipse/jgit/blame/BlameGenerator.java

@ -720,10 +720,8 @@ public class BlameGenerator {
// have an exact content match. For performance reasons // have an exact content match. For performance reasons
// we choose to follow the one parent over trying to do // we choose to follow the one parent over trying to do
// possibly both parents. // possibly both parents.
n.sourceCommit = parent;
n.setSourcePath(PathFilter.create(r.getOldPath())); n.setSourcePath(PathFilter.create(r.getOldPath()));
push(n); return blameEntireRegionOnParent(n, parent);
return false;
} }
renames[pIdx] = r; renames[pIdx] = r;

Loading…
Cancel
Save