aboutsummaryrefslogtreecommitdiffstats
path: root/org.eclipse.jgit/src/org/eclipse/jgit/blame/BlameGenerator.java
diff options
context:
space:
mode:
authorKonrad Kügler <swamblumat-eclipsebugs@yahoo.de>2014-05-03 15:00:47 +0200
committerKonrad Kügler <swamblumat-eclipsebugs@yahoo.de>2014-05-03 15:17:08 +0200
commitc2fb432cdee34f2bd198668e6dffd557578a976c (patch)
treeff23697d47b5fe2df8ed8f1727285eeac935b15c /org.eclipse.jgit/src/org/eclipse/jgit/blame/BlameGenerator.java
parent8b65a4e6c6fbbfb4c62fc69690ebce63ad689981 (diff)
downloadjgit-c2fb432cdee34f2bd198668e6dffd557578a976c.tar.gz
jgit-c2fb432cdee34f2bd198668e6dffd557578a976c.zip
blame: Fix merges, where merge result differs only by whitespace
When blaming a merge commit with "Ignore whitespace changes" enabled, don't discard blame candidates for other parents when we encounter a parent that only has whitespace changes compared to the merge result. The algorithm early prepares parents for blaming, removing the appropriate blame regions from the list of regions still to blame. Only at the end, the prepared blame candidates are submitted for blaming. When looking at a non-first parent which only differs in whitespace to the merge result, it submitted that parent, but only to blame it for the (usually few) lines not already prepared to blame on other parents. Due to an early return the blame candidates for the previous parents were forgotten, leaving many lines unannotated. bug: 433024 Change-Id: I43c9caf2078b92b05e652dbed2192568907bf199 Signed-off-by: Konrad Kügler <swamblumat-eclipsebugs@yahoo.de>
Diffstat (limited to 'org.eclipse.jgit/src/org/eclipse/jgit/blame/BlameGenerator.java')
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/blame/BlameGenerator.java5
1 files changed, 3 insertions, 2 deletions
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/blame/BlameGenerator.java b/org.eclipse.jgit/src/org/eclipse/jgit/blame/BlameGenerator.java
index ca695d2a8b..a54ef56697 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/blame/BlameGenerator.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/blame/BlameGenerator.java
@@ -768,8 +768,9 @@ public class BlameGenerator {
}
p.regionList = n.regionList;
- push(p);
- return false;
+ n.regionList = null;
+ parents[pIdx] = p;
+ break;
}
p.takeBlame(editList, n);