Commit c8d62c39 authored by Jacob Vosmaer (GitLab)'s avatar Jacob Vosmaer (GitLab) Committed by Douwe Maan

Remove some Rugged dependencies from Repository

parent 8ae67a61
...@@ -869,7 +869,7 @@ class Repository ...@@ -869,7 +869,7 @@ class Repository
upstream_commit = commit("refs/remotes/#{MIRROR_REMOTE}/#{branch_name}") upstream_commit = commit("refs/remotes/#{MIRROR_REMOTE}/#{branch_name}")
if upstream_commit if upstream_commit
!rugged_is_ancestor?(branch_commit.id, upstream_commit.id) !raw_repository.ancestor?(branch_commit.id, upstream_commit.id)
else else
false false
end end
...@@ -880,7 +880,7 @@ class Repository ...@@ -880,7 +880,7 @@ class Repository
upstream_commit = commit("refs/remotes/#{remote_ref}/#{branch_name}") upstream_commit = commit("refs/remotes/#{remote_ref}/#{branch_name}")
if upstream_commit if upstream_commit
!rugged_is_ancestor?(upstream_commit.id, branch_commit.id) !raw_repository.ancestor?(upstream_commit.id, branch_commit.id)
else else
false false
end end
...@@ -984,12 +984,6 @@ class Repository ...@@ -984,12 +984,6 @@ class Repository
end end
end end
def main_language
return unless exists?
Linguist::Repository.new(rugged, rugged.head.target_id).language
end
# Caches the supplied block both in a cache and in an instance variable. # Caches the supplied block both in a cache and in an instance variable.
# #
# The cache key and instance variable are named the same way as the value of # The cache key and instance variable are named the same way as the value of
......
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