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
This commit is contained in:
Shawn Pearce 2014-04-19 18:24:43 -07:00
parent 911b115772
commit 4db7e8f94d
1 changed files with 4 additions and 0 deletions

View File

@ -290,6 +290,10 @@ public void computeRange(int start, int end) throws IOException {
BlameGenerator gen = generator;
if (gen == null)
return;
if (start == 0 && end == resultContents.size()) {
computeAll();
return;
}
while (start < end) {
if (hasSourceData(start, end))