summaryrefslogtreecommitdiff
path: root/lib/gitlab/git/rugged_impl/repository.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/gitlab/git/rugged_impl/repository.rb')
-rw-r--r--lib/gitlab/git/rugged_impl/repository.rb5
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/gitlab/git/rugged_impl/repository.rb b/lib/gitlab/git/rugged_impl/repository.rb
index d4500573235..fe0120b1199 100644
--- a/lib/gitlab/git/rugged_impl/repository.rb
+++ b/lib/gitlab/git/rugged_impl/repository.rb
@@ -66,6 +66,11 @@ module Gitlab
rescue Rugged::ReferenceError
nil
end
+
+ # Lookup for rugged object by oid or ref name
+ def lookup(oid_or_ref_name)
+ rugged.rev_parse(oid_or_ref_name)
+ end
end
end
end