summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/gitlab/git/repository.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/gitlab/git/repository.rb b/lib/gitlab/git/repository.rb
index 18210bcab4e..d69fbef0c06 100644
--- a/lib/gitlab/git/repository.rb
+++ b/lib/gitlab/git/repository.rb
@@ -25,7 +25,11 @@ module Gitlab
def create(storage_path, name, bare: true, symlink_hooks_to: nil)
repo_path = File.join(storage_path, name)
repo_path += '.git' unless repo_path.end_with?('.git')
+ create_at_path(repo_path, bare, symlink_hooks_to)
+ end
+ # Used internally by gitaly-ruby
+ def create_at_path(repo_path, bare:, symlink_hooks_to:)
FileUtils.mkdir_p(repo_path, mode: 0770)
# Equivalent to `git --git-path=#{repo_path} init [--bare]`