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/irker_worker.rb
parente0caed91e2cd6b959f808139df7c40f3644f88fd (diff)
Use Gitlab::Git helper methods and constants as much as possible.
Diffstat (limited to 'app/workers/irker_worker.rb')
-rw-r--r--app/workers/irker_worker.rb6
1 files changed, 3 insertions, 3 deletions
diff --git a/app/workers/irker_worker.rb b/app/workers/irker_worker.rb
index 613bae351d8..e1a99d9cad8 100644
--- a/app/workers/irker_worker.rb
+++ b/app/workers/irker_worker.rb
@@ -57,9 +57,9 @@ class IrkerWorker
end
def send_branch_updates(push_data, project, repo_name, committer, branch)
- if push_data['before'] =~ /^000000/
+ if push_data['before'] == Gitlab::Git::BLANK_SHA
send_new_branch project, repo_name, committer, branch
- elsif push_data['after'] =~ /^000000/
+ elsif push_data['after'] == Gitlab::Git::BLANK_SHA
send_del_branch repo_name, committer, branch
end
end
@@ -83,7 +83,7 @@ class IrkerWorker
return if push_data['total_commits_count'] == 0
# Next message is for number of commit pushed, if any
- if push_data['before'] =~ /^000000/
+ if push_data['before'] == Gitlab::Git::BLANK_SHA
# Tweak on push_data["before"] in order to have a nice compare URL
push_data['before'] = before_on_new_branch push_data, project
end