diff options
| author | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2014-10-10 15:58:11 +0300 |
|---|---|---|
| committer | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2014-10-10 15:58:11 +0300 |
| commit | daa55f31d899819069ddbaa9596769a233b5a729 (patch) | |
| tree | 652d2f2d27cfef15c11bf130fc8c9ff856c3a74c | |
| parent | 200118357de47c6db69a48eac2b488bfb46e9026 (diff) | |
| download | gitlab-ce-daa55f31d899819069ddbaa9596769a233b5a729.tar.gz | |
Dont raise exception when wrong commit id passed
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
| -rw-r--r-- | app/models/repository.rb | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/app/models/repository.rb b/app/models/repository.rb index 339e485e6d2..93994123a90 100644 --- a/app/models/repository.rb +++ b/app/models/repository.rb @@ -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) |
