Commit 2cf37f44 authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets

Fix fatal: bad object 0000 when do new branch push

Signed-off-by: default avatarDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
parent 543c2f99
...@@ -23,8 +23,12 @@ class GitlabUpdate ...@@ -23,8 +23,12 @@ class GitlabUpdate
end end
def forced_push? def forced_push?
missed_refs = IO.popen(%W(git rev-list #{@oldrev} ^#{@newrev})).read if @oldrev !~ /00000000/ && @newrev !~ /00000000/
missed_refs.split("\n").size > 0 missed_refs = IO.popen(%W(git rev-list #{@oldrev} ^#{@newrev})).read
missed_refs.split("\n").size > 0
else
false
end
end end
def exec def exec
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment