diff options
author | Douwe Maan <douwe@gitlab.com> | 2015-04-10 18:30:02 +0200 |
---|---|---|
committer | Douwe Maan <douwe@gitlab.com> | 2015-04-10 18:31:07 +0200 |
commit | 0ece6bd82839d0c9e3e27b65a6a201771f09190e (patch) | |
tree | 40c877c8377f2bcad111de9e3bdf0daabdb0c3a3 /app/workers | |
parent | 6cf7dd625a7db143c146de1b146cba7dbcbc2576 (diff) | |
download | gitlab-ce-0ece6bd82839d0c9e3e27b65a6a201771f09190e.tar.gz |
Use `\A` and `\z` in regexes instead of `^` and `$`.
Diffstat (limited to 'app/workers')
-rw-r--r-- | app/workers/post_receive.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/app/workers/post_receive.rb b/app/workers/post_receive.rb index 0c3ee6ba4ff..33d8cc8861b 100644 --- a/app/workers/post_receive.rb +++ b/app/workers/post_receive.rb @@ -11,8 +11,8 @@ class PostReceive log("Check gitlab.yml config for correct gitlab_shell.repos_path variable. \"#{Gitlab.config.gitlab_shell.repos_path}\" does not match \"#{repo_path}\"") end - repo_path.gsub!(/\.git$/, "") - repo_path.gsub!(/^\//, "") + repo_path.gsub!(/\.git\z/, "") + repo_path.gsub!(/\A\//, "") project = Project.find_with_namespace(repo_path) |