Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Grit::Blame can load lines from cache

  • Loading branch information...
commit 51f8fc1eb8d4340a258eb722787addb4972e6bd5 1 parent 3fc864f
@rtomayko rtomayko authored tmm1 committed
Showing with 7 additions and 3 deletions.
  1. +7 −3 lib/grit/blame.rb
View
10 lib/grit/blame.rb
@@ -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
Please sign in to comment.
Something went wrong with that request. Please try again.