Browse Source

[blame] Reset rename detector before computing renames.

Bug: 354507
Change-Id: I5e9c65a082d9dee1e87536c5cf2a8de75efa6a33
Signed-off-by: Kevin Sawicki <kevin@github.com>
stable-1.1
Kevin Sawicki 13 years ago
parent
commit
d110fbc300
  1. 1
      org.eclipse.jgit/src/org/eclipse/jgit/blame/BlameGenerator.java

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

@ -945,6 +945,7 @@ public class BlameGenerator {
treeWalk.setFilter(TreeFilter.ANY_DIFF); treeWalk.setFilter(TreeFilter.ANY_DIFF);
treeWalk.reset(parent.getTree(), commit.getTree()); treeWalk.reset(parent.getTree(), commit.getTree());
renameDetector.reset();
renameDetector.addAll(DiffEntry.scan(treeWalk)); renameDetector.addAll(DiffEntry.scan(treeWalk));
for (DiffEntry ent : renameDetector.compute()) { for (DiffEntry ent : renameDetector.compute()) {
if (isRename(ent) && ent.getNewPath().equals(path.getPath())) if (isRename(ent) && ent.getNewPath().equals(path.getPath()))

Loading…
Cancel
Save