Permalink
Browse files

Grit::Blame can load lines from cache

  • Loading branch information...
1 parent 3fc864f commit 51f8fc1eb8d4340a258eb722787addb4972e6bd5 @rtomayko rtomayko committed with tmm1 Apr 22, 2012
Showing with 7 additions and 3 deletions.
  1. +7 −3 lib/grit/blame.rb
View
@@ -4,12 +4,16 @@ class Blame
attr_reader :lines
- def initialize(repo, file, commit)
+ def initialize(repo, file, commit, lines=nil)
@repo = repo
@file = file
@commit = commit
- @lines = []
- load_blame
+ if lines.nil?
+ @lines = []
+ load_blame
+ else
+ @lines = lines
+ end
end
def load_blame

0 comments on commit 51f8fc1

Please sign in to comment.