diff options
author | Jacob Vosmaer <jacob@gitlab.com> | 2017-09-19 17:02:46 +0300 |
---|---|---|
committer | Jacob Vosmaer <jacob@gitlab.com> | 2017-09-19 17:02:46 +0300 |
commit | 713b8d116814d83f6bfe452091a40269cc9d42ec (patch) | |
tree | c79b88be5516cc20a99ba87bece3fbbe657194ee | |
parent | 4c6c105909ea610eac760b05e66d9efc57cbb43c (diff) |
Expose internal repository create method for gitalycreate-repository-internal
-rw-r--r-- | lib/gitlab/git/repository.rb | 4 |
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]` |