diff options
author | Jacob Vosmaer <jacob@gitlab.com> | 2018-06-04 17:58:12 +0200 |
---|---|---|
committer | Jacob Vosmaer <jacob@gitlab.com> | 2018-06-04 17:58:12 +0200 |
commit | 28ea720bf523a8bc071eacece7d9589d937a189f (patch) | |
tree | 7a6694bc4af170742589ebec3a5aa233230be86b | |
parent | 515c0e37af5dbb9bf7b9ae9fe7a9e28968d5edeb (diff) | |
download | gitlab-ce-write-config-not-found.tar.gz |
Move guardwrite-config-not-found
-rw-r--r-- | lib/gitlab/git/repository.rb | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/gitlab/git/repository.rb b/lib/gitlab/git/repository.rb index 32001347e1f..7acf11e3c91 100644 --- a/lib/gitlab/git/repository.rb +++ b/lib/gitlab/git/repository.rb @@ -1397,13 +1397,13 @@ module Gitlab def write_config(full_path:) return unless full_path.present? + # This guard avoids Gitaly log/error spam + unless exists? + raise NoRepository, 'repository does not exist' + end + gitaly_migrate(:write_config) do |is_enabled| if is_enabled - # This guard avoids Gitaly log/error spam - unless exists? - raise NoRepository, 'repository does not exist' - end - gitaly_repository_client.write_config(full_path: full_path) else rugged_write_config(full_path: full_path) |