Dont raise exception when wrong commit id passed

Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
This commit is contained in:
Dmitriy Zaporozhets 2014-10-10 15:58:11 +03:00
parent 200118357d
commit daa55f31d8
No known key found for this signature in database
GPG key ID: 161B5D6A44D3D88A

View file

@ -30,6 +30,8 @@ class Repository
commit = Gitlab::Git::Commit.find(raw_repository, id)
commit = Commit.new(commit) if commit
commit
rescue Rugged::OdbError => ex
nil
end
def commits(ref, path = nil, limit = nil, offset = nil, skip_merges = false)