Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCiro Santilli <ciro.santilli@gmail.com>2014-11-03 22:35:06 +0300
committerCiro Santilli <ciro.santilli@gmail.com>2014-11-03 22:37:08 +0300
commitc3be1517ae3c576f7f4248b82b611a833fe06675 (patch)
treef5e2f963afdbf33e049d36328408b100eae9517d /app/services/git_push_service.rb
parent1b1403804e03db3cea3ad6a84dcfead449ed29d5 (diff)
Factor '0' * 40 blank ref constants
Diffstat (limited to 'app/services/git_push_service.rb')
-rw-r--r--app/services/git_push_service.rb6
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)