diff options
author | Kamil Trzcinski <ayufan@ayufan.eu> | 2016-07-20 11:31:23 +0300 |
---|---|---|
committer | Kamil Trzcinski <ayufan@ayufan.eu> | 2016-07-20 11:31:23 +0300 |
commit | 2016f367f0e6f718e8e938bd85cd81d7a99d6c10 (patch) | |
tree | 9fd352f5a7591d4fb35056000087ebcd36ad0469 /lib/gitlab | |
parent | 737e5226f87b06c2fe8633819bce1fde16308f19 (diff) | |
parent | 79b02e40e5842540ceff4454f6c2c51f13fc081c (diff) |
Merge remote-tracking branch 'origin/master' into cs-warn-on-failure
Diffstat (limited to 'lib/gitlab')
-rw-r--r-- | lib/gitlab/checks/force_push.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/gitlab/checks/force_push.rb b/lib/gitlab/checks/force_push.rb index dfa83a0eab3..5fe86553bd0 100644 --- a/lib/gitlab/checks/force_push.rb +++ b/lib/gitlab/checks/force_push.rb @@ -8,8 +8,8 @@ module Gitlab if Gitlab::Git.blank_ref?(oldrev) || Gitlab::Git.blank_ref?(newrev) false else - missed_refs, _ = Gitlab::Popen.popen(%W(#{Gitlab.config.git.bin_path} --git-dir=#{project.repository.path_to_repo} rev-list #{oldrev} ^#{newrev})) - missed_refs.split("\n").size > 0 + missed_ref, _ = Gitlab::Popen.popen(%W(#{Gitlab.config.git.bin_path} --git-dir=#{project.repository.path_to_repo} rev-list --max-count=1 #{oldrev} ^#{newrev})) + missed_ref.present? end end end |