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-04-10 19:30:02 +0300
committerDouwe Maan <douwe@gitlab.com>2015-04-10 19:31:07 +0300
commit0ece6bd82839d0c9e3e27b65a6a201771f09190e (patch)
tree40c877c8377f2bcad111de9e3bdf0daabdb0c3a3 /app/helpers/submodule_helper.rb
parent6cf7dd625a7db143c146de1b146cba7dbcbc2576 (diff)
Use `\A` and `\z` in regexes instead of `^` and `$`.
Diffstat (limited to 'app/helpers/submodule_helper.rb')
-rw-r--r--app/helpers/submodule_helper.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/app/helpers/submodule_helper.rb b/app/helpers/submodule_helper.rb
index 241462e5e4c..48aa1eda67d 100644
--- a/app/helpers/submodule_helper.rb
+++ b/app/helpers/submodule_helper.rb
@@ -44,7 +44,7 @@ module SubmoduleHelper
def relative_self_url?(url)
# (./)?(../repo.git) || (./)?(../../project/repo.git) )
- url =~ /^((\.\/)?(\.\.\/))(?!(\.\.)|(.*\/)).*\.git\Z/ || url =~ /^((\.\/)?(\.\.\/){2})(?!(\.\.))([^\/]*)\/(?!(\.\.)|(.*\/)).*\.git\Z/
+ url =~ /\A((\.\/)?(\.\.\/))(?!(\.\.)|(.*\/)).*\.git\z/ || url =~ /\A((\.\/)?(\.\.\/){2})(?!(\.\.))([^\/]*)\/(?!(\.\.)|(.*\/)).*\.git\z/
end
def standard_links(host, namespace, project, commit)