Dont raise exception when wrong commit id passed
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
This commit is contained in:
parent
200118357d
commit
daa55f31d8
1 changed files with 2 additions and 0 deletions
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue