Commit 19b21c2e authored by Yorick Peterse's avatar Yorick Peterse

Use Repository#exists? in Repository#commit?

Just checking raw_repository is no longer accurate to determine if a
repository exists or not.
parent 8a7aad77
...@@ -68,7 +68,7 @@ class Repository ...@@ -68,7 +68,7 @@ class Repository
end end
def commit(id = 'HEAD') def commit(id = 'HEAD')
return nil unless raw_repository return nil unless exists?
commit = Gitlab::Git::Commit.find(raw_repository, id) commit = Gitlab::Git::Commit.find(raw_repository, id)
commit = Commit.new(commit, @project) if commit commit = Commit.new(commit, @project) if commit
commit commit
......
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