diff options
author | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2014-04-03 15:03:02 +0300 |
---|---|---|
committer | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2014-04-03 15:03:02 +0300 |
commit | d299e7ef2be2504e696b071110bbed2dd2710db5 (patch) | |
tree | 155a4427bb0c48a4d6e01c92df0acdd55bf64b0d /lib/gitlab_update.rb | |
parent | d5adeb1f781cd92c70453b5e4273d4afe5b5a2d1 (diff) | |
download | gitlab-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.rb | 4 |
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 |