diff options
author | Ciro Santilli <ciro.santilli@gmail.com> | 2014-11-03 22:35:06 +0300 |
---|---|---|
committer | Ciro Santilli <ciro.santilli@gmail.com> | 2014-11-03 22:37:08 +0300 |
commit | c3be1517ae3c576f7f4248b82b611a833fe06675 (patch) | |
tree | f5e2f963afdbf33e049d36328408b100eae9517d /app/services/git_push_service.rb | |
parent | 1b1403804e03db3cea3ad6a84dcfead449ed29d5 (diff) |
Factor '0' * 40 blank ref constants
Diffstat (limited to 'app/services/git_push_service.rb')
-rw-r--r-- | app/services/git_push_service.rb | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/app/services/git_push_service.rb b/app/services/git_push_service.rb index 8f2b0e347f6..3f5222c93f1 100644 --- a/app/services/git_push_service.rb +++ b/app/services/git_push_service.rb @@ -160,19 +160,19 @@ class GitPushService ref_parts = ref.split('/') # Return if this is not a push to a branch (e.g. new commits) - ref_parts[1] =~ /heads/ && oldrev != "0000000000000000000000000000000000000000" + ref_parts[1] =~ /heads/ && oldrev != Gitlab::Git::BLANK_SHA end def push_to_new_branch?(ref, oldrev) ref_parts = ref.split('/') - ref_parts[1] =~ /heads/ && oldrev == "0000000000000000000000000000000000000000" + ref_parts[1] =~ /heads/ && oldrev == Gitlab::Git::BLANK_SHA end def push_remove_branch?(ref, newrev) ref_parts = ref.split('/') - ref_parts[1] =~ /heads/ && newrev == "0000000000000000000000000000000000000000" + ref_parts[1] =~ /heads/ && newrev == Gitlab::Git::BLANK_SHA end def push_to_branch?(ref) |