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:
authorDouwe Maan <douwe@gitlab.com>2015-03-10 13:51:36 +0300
committerDouwe Maan <douwe@gitlab.com>2015-03-10 15:39:31 +0300
commit383c56efa1882d9cab956de5b5b72e51691c3f0c (patch)
tree1eebe2c35351d44a9fa54f53658346f86d9566a3 /app/workers/emails_on_push_worker.rb
parente0caed91e2cd6b959f808139df7c40f3644f88fd (diff)
Use Gitlab::Git helper methods and constants as much as possible.
Diffstat (limited to 'app/workers/emails_on_push_worker.rb')
-rw-r--r--app/workers/emails_on_push_worker.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/app/workers/emails_on_push_worker.rb b/app/workers/emails_on_push_worker.rb
index 2e783814824..e59ca81defe 100644
--- a/app/workers/emails_on_push_worker.rb
+++ b/app/workers/emails_on_push_worker.rb
@@ -8,7 +8,7 @@ class EmailsOnPushWorker
branch = push_data["ref"]
author_id = push_data["user_id"]
- if before_sha =~ /^000000/ || after_sha =~ /^000000/
+ if Gitlab::Git.blank_ref?(before_sha) || Gitlab::Git.blank_ref?(after_sha)
# skip if new branch was pushed or branch was removed
return true
end