diff options
author | Jacob Vosmaer <jacob@gitlab.com> | 2017-09-28 19:10:40 +0200 |
---|---|---|
committer | Jacob Vosmaer <jacob@gitlab.com> | 2017-09-28 19:10:40 +0200 |
commit | 561e82533f536514c089baef18887a507feae28e (patch) | |
tree | 0f1bc502eeda010331df762a98ad06bd7cdb2571 | |
parent | c0d7dc1d829717ccd9e3137753a36a8ceb7e358c (diff) | |
download | gitlab-ce-561e82533f536514c089baef18887a507feae28e.tar.gz |
Add .git suffix in one place
-rw-r--r-- | lib/gitlab/shell.rb | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/gitlab/shell.rb b/lib/gitlab/shell.rb index a31ba14dc45..1736558cc5b 100644 --- a/lib/gitlab/shell.rb +++ b/lib/gitlab/shell.rb @@ -73,16 +73,16 @@ module Gitlab # # Gitaly migration: https://gitlab.com/gitlab-org/gitaly/issues/387 def add_repository(storage, name) + name << '.git' unless name.end_with?('.git') + gitaly_migrate(:create_repository) do |is_enabled| if is_enabled - repository = Gitlab::Git::Repository.new(storage, name + '.git', '') + repository = Gitlab::Git::Repository.new(storage, name) repository.gitaly_repository_client.create_repository true else storage_path = Gitlab.config.repositories.storages[storage]['path'] - repo_path = storage_path + name - repo_path << '.git' unless repo_path.end_with?('.git') - Gitlab::Git::Repository.create(repo_path, bare: true, symlink_hooks_to: gitlab_shell_hooks_path) + Gitlab::Git::Repository.create(storage_path + name, bare: true, symlink_hooks_to: gitlab_shell_hooks_path) end end rescue => err |