diff options
author | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2014-04-03 18:20:03 +0300 |
---|---|---|
committer | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2014-04-03 18:20:03 +0300 |
commit | 2cf37f44e171fd5b6fd5978fd5c40608b8039f9e (patch) | |
tree | 3b34517d92bf1e6be252c0aa90953f3c2b7fefdf | |
parent | 543c2f99a16400b07734ece86d45acfe775986ea (diff) | |
download | gitlab-shell-2cf37f44e171fd5b6fd5978fd5c40608b8039f9e.tar.gz |
Fix fatal: bad object 0000 when do new branch push
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
-rw-r--r-- | lib/gitlab_update.rb | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/lib/gitlab_update.rb b/lib/gitlab_update.rb index d581787..4b0673f 100644 --- a/lib/gitlab_update.rb +++ b/lib/gitlab_update.rb @@ -23,8 +23,12 @@ class GitlabUpdate end def forced_push? - missed_refs = IO.popen(%W(git rev-list #{@oldrev} ^#{@newrev})).read - missed_refs.split("\n").size > 0 + if @oldrev !~ /00000000/ && @newrev !~ /00000000/ + missed_refs = IO.popen(%W(git rev-list #{@oldrev} ^#{@newrev})).read + missed_refs.split("\n").size > 0 + else + false + end end def exec |