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
|
@ -30,6 +30,8 @@ class Repository
|
||||||
commit = Gitlab::Git::Commit.find(raw_repository, id)
|
commit = Gitlab::Git::Commit.find(raw_repository, id)
|
||||||
commit = Commit.new(commit) if commit
|
commit = Commit.new(commit) if commit
|
||||||
commit
|
commit
|
||||||
|
rescue Rugged::OdbError => ex
|
||||||
|
nil
|
||||||
end
|
end
|
||||||
|
|
||||||
def commits(ref, path = nil, limit = nil, offset = nil, skip_merges = false)
|
def commits(ref, path = nil, limit = nil, offset = nil, skip_merges = false)
|
||||||
|
|
Loading…
Reference in New Issue