diff options
Diffstat (limited to 'lib/gitlab/git/path_helper.rb')
-rw-r--r-- | lib/gitlab/git/path_helper.rb | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/gitlab/git/path_helper.rb b/lib/gitlab/git/path_helper.rb index 0148cd8df05..155cf52f050 100644 --- a/lib/gitlab/git/path_helper.rb +++ b/lib/gitlab/git/path_helper.rb @@ -1,10 +1,12 @@ +# Gitaly note: JV: no RPC's here. + module Gitlab module Git class PathHelper class << self def normalize_path(filename) # Strip all leading slashes so that //foo -> foo - filename[/^\/*/] = '' + filename[%r{^/*}] = '' # Expand relative paths (e.g. foo/../bar) filename = Pathname.new(filename) |