diff --git a/changelogs/unreleased/sh-restore-all-refs-backup.yml b/changelogs/unreleased/sh-restore-all-refs-backup.yml new file mode 100644 index 0000000000000000000000000000000000000000..eaac0c71dd0fed62ceece2771dfd66cafbd4ed79 --- /dev/null +++ b/changelogs/unreleased/sh-restore-all-refs-backup.yml @@ -0,0 +1,5 @@ +--- +title: Ensure all refs are restored on a restore from backup +merge_request: +author: +type: fixed diff --git a/lib/backup/repository.rb b/lib/backup/repository.rb index 4e92be8511098176f51795479782f4fee4bfe018..3ad09a1b421356c6ff6f13de084b38c3eac1ba1d 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