Commit 4f15460d authored by Zeger-Jan van de Weg's avatar Zeger-Jan van de Weg

Remove rugged call in blame controller

Fetching commits through #lookup uses rugged, and this is phased out.

Also adds a short circuit in the `feature_enabled?` Gitaly method to
allow Gitaly to be used when objects are set up with `let` before an
example is run.
parent c8bfb3e4
...@@ -15,10 +15,7 @@ module Gitlab ...@@ -15,10 +15,7 @@ module Gitlab
def each def each
@blames.each do |blame| @blames.each do |blame|
yield( yield(blame.commit, blame.line)
Gitlab::Git::Commit.new(@repo, blame.commit),
blame.line
)
end end
end end
...@@ -60,9 +57,8 @@ module Gitlab ...@@ -60,9 +57,8 @@ module Gitlab
end end
end end
# load all commits in single call Gitlab::Git::Commit.batch_by_oid(@repo, commits.keys).each do |commit|
commits.keys.each do |key| commits[commit.sha] = commit
commits[key] = @repo.lookup(key)
end end
# get it together # get it together
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment