Skip to content
Snippets Groups Projects
Commit 3ddde75a authored by Kim "BKC" Carlbäcker's avatar Kim "BKC" Carlbäcker
Browse files

Make 'git fsck' mandatory

parent 7734e85b
No related branches found
No related tags found
No related merge requests found
Loading
Loading
@@ -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)
Loading
Loading
@@ -1606,14 +1600,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
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment