summaryrefslogtreecommitdiff
path: root/lib/gitlab_update.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/gitlab_update.rb')
-rw-r--r--lib/gitlab_update.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/gitlab_update.rb b/lib/gitlab_update.rb
index 43d5b07..d581787 100644
--- a/lib/gitlab_update.rb
+++ b/lib/gitlab_update.rb
@@ -23,7 +23,7 @@ class GitlabUpdate
end
def forced_push?
- missed_refs = IO.popen(%W(git rev-list #{@newrev}..#{@oldrev} --)).read
+ missed_refs = IO.popen(%W(git rev-list #{@oldrev} ^#{@newrev})).read
missed_refs.split("\n").size > 0
end
@@ -32,7 +32,7 @@ class GitlabUpdate
# get value from it
ENV['GL_ID'] = nil
- if api.allowed?('git-receive-pack', @repo_name, @actor, @ref_name, @oldrev, @newrev, forced_push)
+ if api.allowed?('git-receive-pack', @repo_name, @actor, @ref_name, @oldrev, @newrev, forced_push?)
update_redis
exit 0
else