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:
authorStan Hu <stanhu@gmail.com>2019-01-17 22:17:14 +0300
committerStan Hu <stanhu@gmail.com>2019-02-06 08:33:09 +0300
commit59a7d67fb9b5ae69b0a0860fb0564284ad1228f2 (patch)
treed580ce090a713a5a1a94d57af637dd38d9b9c4d3 /lib/gitlab
parenta9ab6dbc637bc0a531760b0425d655a507827db3 (diff)
Rename name -> disk_path in create_repository
With hashed storage, the project name may not necessarily be the project name, so rename the variable to make it clear.
Diffstat (limited to 'lib/gitlab')
-rw-r--r--lib/gitlab/shell.rb8
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/gitlab/shell.rb b/lib/gitlab/shell.rb
index 62fcc08ffdf..04299927713 100644
--- a/lib/gitlab/shell.rb
+++ b/lib/gitlab/shell.rb
@@ -67,14 +67,14 @@ module Gitlab
# Init new repository
#
# storage - the shard key
- # name - project disk path
+ # disk_path - project disk path
# gl_project_name - project name
#
# Ex.
# create_repository("default", "path/to/gitlab-ci", "gitlab/gitlab-ci")
#
- def create_repository(storage, name, gl_project_name)
- relative_path = name.dup
+ def create_repository(storage, disk_path, gl_project_name)
+ relative_path = disk_path.dup
relative_path << '.git' unless relative_path.end_with?('.git')
repository = Gitlab::Git::Repository.new(storage, relative_path, '', gl_project_name)
@@ -82,7 +82,7 @@ module Gitlab
true
rescue => err # Once the Rugged codes gets removes this can be improved
- Rails.logger.error("Failed to add repository #{storage}/#{name}: #{err}")
+ Rails.logger.error("Failed to add repository #{storage}/#{disk_path}: #{err}")
false
end