summaryrefslogtreecommitdiff
path: root/lib/gitlab_update.rb
diff options
context:
space:
mode:
authorDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2014-04-03 15:03:02 +0300
committerDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2014-04-03 15:03:02 +0300
commitd299e7ef2be2504e696b071110bbed2dd2710db5 (patch)
tree155a4427bb0c48a4d6e01c92df0acdd55bf64b0d /lib/gitlab_update.rb
parentd5adeb1f781cd92c70453b5e4273d4afe5b5a2d1 (diff)
downloadgitlab-shell-d299e7ef2be2504e696b071110bbed2dd2710db5.tar.gz
Make force push detection actually work
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
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