BigW Consortium Gitlab

Commit f3f304dc by Stan Hu

Ensure all refs are restored on a restore from backup

To restore all refs from a bundle, we need to use the --mirror option to ensure that all refs are properly restored. Without this, refs such as `refs/merge-requests/X` and `refs/keep-around/Y` would be omitted, which exposed a bug as described in https://gitlab.com/gitlab-org/gitlab-ce/issues/38319#note_41648608. Closes #38352
parent 171714c9
---
title: Ensure all refs are restored on a restore from backup
merge_request:
author:
type: fixed
......@@ -78,7 +78,7 @@ module Backup
project.ensure_storage_path_exists
cmd = if File.exist?(path_to_project_bundle)
%W(#{Gitlab.config.git.bin_path} clone --bare #{path_to_project_bundle} #{path_to_project_repo})
%W(#{Gitlab.config.git.bin_path} clone --bare --mirror #{path_to_project_bundle} #{path_to_project_repo})
else
%W(#{Gitlab.config.git.bin_path} init --bare #{path_to_project_repo})
end
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment