Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStan Hu <stanhu@gmail.com>2017-09-30 01:10:36 +0300
committerStan Hu <stanhu@gmail.com>2017-09-30 01:17:05 +0300
commitf3f304dc06231b7fb5af71607a5a61574bd9a0ac (patch)
treea2f3b64f50aed5e23f85f23cba85698efad9dda3 /lib/backup
parent171714c9231deb95136088ba1c0621379467de39 (diff)
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
Diffstat (limited to 'lib/backup')
-rw-r--r--lib/backup/repository.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/backup/repository.rb b/lib/backup/repository.rb
index 4e92be85110..3ad09a1b421 100644
--- a/lib/backup/repository.rb
+++ b/lib/backup/repository.rb
@@ -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