Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
authorDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2014-10-10 16:58:11 +0400
committerDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2014-10-10 16:58:11 +0400
commitdaa55f31d899819069ddbaa9596769a233b5a729 (patch)
tree652d2f2d27cfef15c11bf130fc8c9ff856c3a74c /app
parent200118357de47c6db69a48eac2b488bfb46e9026 (diff)
Dont raise exception when wrong commit id passed
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
Diffstat (limited to 'app')
-rw-r--r--app/models/repository.rb2
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)