From 4db7e8f94d3764e4ebdb51fb6f22b75d701bb248 Mon Sep 17 00:00:00 2001 From: Shawn Pearce Date: Sat, 19 Apr 2014 18:24:43 -0700 Subject: [PATCH] blame: Only use computeRange if -L was requested The computeRange method is inefficient for computing the entire file. If the entire file was selected ask for the entire file. Change-Id: I8b2dbf635e875cc125443dac50be121208646540 --- org.eclipse.jgit/src/org/eclipse/jgit/blame/BlameResult.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/blame/BlameResult.java b/org.eclipse.jgit/src/org/eclipse/jgit/blame/BlameResult.java index 2d445fd7b2..faaa227b48 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/blame/BlameResult.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/blame/BlameResult.java @@ -290,6 +290,10 @@ public class BlameResult { BlameGenerator gen = generator; if (gen == null) return; + if (start == 0 && end == resultContents.size()) { + computeAll(); + return; + } while (start < end) { if (hasSourceData(start, end)) -- 2.39.5