diff options
author | Douwe Maan <douwe@gitlab.com> | 2019-04-29 10:39:49 +0000 |
---|---|---|
committer | Douwe Maan <douwe@gitlab.com> | 2019-04-29 10:39:49 +0000 |
commit | addefa8edde081cebe6271acecaabd6f1fe21672 (patch) | |
tree | ee585f477e646b85e19642a8d1006cc8a0ba2ae1 /lib | |
parent | 6885419a48c39ab9f38aea13ec1900b10bce7d80 (diff) | |
parent | 33cf8edae170890ccd4510490f1dcd2f345c81fa (diff) | |
download | gitlab-ce-addefa8edde081cebe6271acecaabd6f1fe21672.tar.gz |
Merge branch 'bvl-initialize-design-repo-ce' into 'master'
Port changes for design management to CE
See merge request gitlab-org/gitlab-ce!27555
Diffstat (limited to 'lib')
-rw-r--r-- | lib/gitlab/git/repository.rb | 6 | ||||
-rw-r--r-- | lib/gitlab/git_access.rb | 6 |
2 files changed, 11 insertions, 1 deletions
diff --git a/lib/gitlab/git/repository.rb b/lib/gitlab/git/repository.rb index c12cb6a6434..55bd77f6c4a 100644 --- a/lib/gitlab/git/repository.rb +++ b/lib/gitlab/git/repository.rb @@ -118,6 +118,12 @@ module Gitlab gitaly_repository_client.exists? end + def create_repository + wrapped_gitaly_errors do + gitaly_repository_client.create_repository + end + end + # Returns an Array of branch names # sorted by name ASC def branch_names diff --git a/lib/gitlab/git_access.rb b/lib/gitlab/git_access.rb index cb80ed64eff..4b626509008 100644 --- a/lib/gitlab/git_access.rb +++ b/lib/gitlab/git_access.rb @@ -85,7 +85,7 @@ module Gitlab check_push_access! end - ::Gitlab::GitAccessResult::Success.new(console_messages: check_for_console_messages(cmd)) + success_result(cmd) end def guest_can_download_code? @@ -365,6 +365,10 @@ module Gitlab protected + def success_result(cmd) + ::Gitlab::GitAccessResult::Success.new(console_messages: check_for_console_messages(cmd)) + end + def changes_list @changes_list ||= Gitlab::ChangesList.new(changes == ANY ? [] : changes) end |