summaryrefslogtreecommitdiff
path: root/app/services
diff options
context:
space:
mode:
authorDouwe Maan <douwe@gitlab.com>2015-04-10 18:30:02 +0200
committerDouwe Maan <douwe@gitlab.com>2015-04-10 18:31:07 +0200
commit0ece6bd82839d0c9e3e27b65a6a201771f09190e (patch)
tree40c877c8377f2bcad111de9e3bdf0daabdb0c3a3 /app/services
parent6cf7dd625a7db143c146de1b146cba7dbcbc2576 (diff)
downloadgitlab-ce-0ece6bd82839d0c9e3e27b65a6a201771f09190e.tar.gz
Use `\A` and `\z` in regexes instead of `^` and `$`.
Diffstat (limited to 'app/services')
-rw-r--r--app/services/create_tag_service.rb4
1 files changed, 1 insertions, 3 deletions
diff --git a/app/services/create_tag_service.rb b/app/services/create_tag_service.rb
index 4115d689925..25f9e203246 100644
--- a/app/services/create_tag_service.rb
+++ b/app/services/create_tag_service.rb
@@ -13,9 +13,7 @@ class CreateTagService < BaseService
return error('Tag already exists')
end
- if message
- message.gsub!(/^\s+|\s+$/, '')
- end
+ message.strip! if message
repository.add_tag(tag_name, ref, message)
new_tag = repository.find_tag(tag_name)