diff options
author | Douwe Maan <douwe@gitlab.com> | 2018-03-08 22:21:04 +0000 |
---|---|---|
committer | Douwe Maan <douwe@gitlab.com> | 2018-03-08 22:21:04 +0000 |
commit | 47b9854dac5d255f0ad68cb3310c66a7111b792e (patch) | |
tree | 2cf6acb7fd7a7e48103d20f803ab77c5850a9d36 | |
parent | 7623cae9bd540ace6651eba412c951cd1a7c4a44 (diff) | |
parent | 3ddde75a1b0d1beca4e2294b567ec3c227ace6f5 (diff) | |
download | gitlab-ce-47b9854dac5d255f0ad68cb3310c66a7111b792e.tar.gz |
Merge branch 'gitaly-fsck-mandatory' into 'master'
Make 'git fsck' mandatory
See merge request gitlab-org/gitlab-ce!17648
-rw-r--r-- | lib/gitlab/git/repository.rb | 18 |
1 files changed, 2 insertions, 16 deletions
diff --git a/lib/gitlab/git/repository.rb b/lib/gitlab/git/repository.rb index 656f3999756..fbc93542619 100644 --- a/lib/gitlab/git/repository.rb +++ b/lib/gitlab/git/repository.rb @@ -1189,15 +1189,9 @@ module Gitlab end def fsck - gitaly_migrate(:git_fsck) do |is_enabled| - msg, status = if is_enabled - gitaly_fsck - else - shell_fsck - end + msg, status = gitaly_repository_client.fsck - raise GitError.new("Could not fsck repository: #{msg}") unless status.zero? - end + raise GitError.new("Could not fsck repository: #{msg}") unless status.zero? end def create_from_bundle(bundle_path) @@ -1596,14 +1590,6 @@ module Gitlab File.write(File.join(worktree_info_path, 'sparse-checkout'), files) end - def gitaly_fsck - gitaly_repository_client.fsck - end - - def shell_fsck - run_git(%W[--git-dir=#{path} fsck], nice: true) - end - def rugged_fetch_source_branch(source_repository, source_branch, local_ref) with_repo_branch_commit(source_repository, source_branch) do |commit| if commit |