提交 19b21c2e 编写于 作者: Y Yorick Peterse

Use Repository#exists? in Repository#commit?

Just checking raw_repository is no longer accurate to determine if a
repository exists or not.
上级 8a7aad77
......@@ -68,7 +68,7 @@ class Repository
end
def commit(id = 'HEAD')
return nil unless raw_repository
return nil unless exists?
commit = Gitlab::Git::Commit.find(raw_repository, id)
commit = Commit.new(commit, @project) if commit
commit
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册