summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStan Hu <stanhu@gmail.com>2019-01-17 11:21:29 -0800
committerStan Hu <stanhu@gmail.com>2019-02-05 21:33:10 -0800
commit1af22dbe5c4dad1217199ac5e9282dbe26d39aca (patch)
tree41b8734d3e31457ef94e3ec5ca1942709659fe3d
parent59a7d67fb9b5ae69b0a0860fb0564284ad1228f2 (diff)
downloadgitlab-ce-1af22dbe5c4dad1217199ac5e9282dbe26d39aca.tar.gz
Add comment to explain why gl_repository is blank
During creation of a repository, gl_repository may not be known because that depends on a yet-to-be assigned project ID in the database (e.g. project-1234), so for now it is blank.
-rw-r--r--lib/gitlab/shell.rb3
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/gitlab/shell.rb b/lib/gitlab/shell.rb
index 04299927713..c8d891500d7 100644
--- a/lib/gitlab/shell.rb
+++ b/lib/gitlab/shell.rb
@@ -77,6 +77,9 @@ module Gitlab
relative_path = disk_path.dup
relative_path << '.git' unless relative_path.end_with?('.git')
+ # During creation of a repository, gl_repository may not be known
+ # because that depends on a yet-to-be assigned project ID in the
+ # database (e.g. project-1234), so for now it is blank.
repository = Gitlab::Git::Repository.new(storage, relative_path, '', gl_project_name)
wrapped_gitaly_errors { repository.gitaly_repository_client.create_repository }