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>2016-03-25 19:54:57 +0300
committerDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2016-03-25 19:54:57 +0300
commit179bae9968e6da5c09a1789fba7c4b706e144804 (patch)
tree31c327ea1ad0d512632e4d9690d213417570bb28 /app
parent3dc0c3e473a68056c237de3d31415c8034ba1e52 (diff)
rescue Rugged::ReferenceError in Repository#gitlab_ci_yml method
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
Diffstat (limited to 'app')
-rw-r--r--app/models/repository.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/app/models/repository.rb b/app/models/repository.rb
index 0a9cc364b77..908d765fb47 100644
--- a/app/models/repository.rb
+++ b/app/models/repository.rb
@@ -473,6 +473,10 @@ class Repository
@gitlab_ci_yml ||= tree(:head).blobs.find do |file|
file.name == '.gitlab-ci.yml'
end
+ rescue Rugged::ReferenceError
+ # For unknow reason spinach scenario "Scenario: I change project path"
+ # lead to "Reference 'HEAD' not found" exception from Repository#empty?
+ nil
end
def head_commit