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
diff options
context:
space:
mode:
authorRémy Coutable <remy@rymai.me>2017-04-05 10:34:50 +0300
committerRémy Coutable <remy@rymai.me>2017-04-10 17:10:18 +0300
commitae88355bb87f4693603113ee16e4920d2d092f1e (patch)
tree64005b712ff1915e631d56cf639f5d5806b36ad1 /lib/gitlab/checks
parentcb20cfa244db896b87d2fb8b6ccad5b9f0713298 (diff)
Retrieve Git-specific env in Gitlab::Git::RevList and add a new #new_refs method
Signed-off-by: Rémy Coutable <remy@rymai.me>
Diffstat (limited to 'lib/gitlab/checks')
-rw-r--r--lib/gitlab/checks/force_push.rb10
1 files changed, 3 insertions, 7 deletions
diff --git a/lib/gitlab/checks/force_push.rb b/lib/gitlab/checks/force_push.rb
index de0c9049ebf..7284849aa18 100644
--- a/lib/gitlab/checks/force_push.rb
+++ b/lib/gitlab/checks/force_push.rb
@@ -8,13 +8,9 @@ module Gitlab
if Gitlab::Git.blank_ref?(oldrev) || Gitlab::Git.blank_ref?(newrev)
false
else
- missed_ref, exit_status = Gitlab::Git::RevList.new(oldrev, newrev, project: project, env: env).execute
-
- if exit_status == 0
- missed_ref.present?
- else
- raise "Got a non-zero exit code while calling out to `git rev-list` in the force-push check."
- end
+ Gitlab::Git::RevList.new(
+ path_to_repo: project.repository.path_to_repo,
+ oldrev: oldrev, newrev: newrev).missed_ref.present?
end
end
end