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

gitlab.com/gitlab-org/gitaly.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJames Fargher <jfargher@gitlab.com>2021-11-30 01:22:32 +0300
committerJames Fargher <jfargher@gitlab.com>2021-12-09 02:09:43 +0300
commitf82770d22ca0da84063785abdfa93ed958cdeb9b (patch)
tree4532eae2cc4171ccec80a60367d573f5ef4be219
parentaadd0dbe3c111f4bc83e37bff3577ed6cd884070 (diff)
backup: Set HEAD from bundle filesupdate-head-14-4
Previously backup relied on git-clone setting HEAD from bundle files but now that we apply a series of bundles, the bundles are applied using git-fetch instead. This means we need to apply our own HEAD setting logic based off of the bundle. ChecksumTestRepo was incorrectly calculating repository checksums without HEAD. Changelog: fixed
-rw-r--r--internal/backup/backup.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/internal/backup/backup.go b/internal/backup/backup.go
index 9543a4483..7a1e70f24 100644
--- a/internal/backup/backup.go
+++ b/internal/backup/backup.go
@@ -333,7 +333,7 @@ func (mgr *Manager) restoreBundle(ctx context.Context, path string, server stora
if err != nil {
return fmt.Errorf("restore bundle: %q: %w", path, err)
}
- request := &gitalypb.FetchBundleRequest{Repository: repo}
+ request := &gitalypb.FetchBundleRequest{Repository: repo, UpdateHead: true}
bundle := streamio.NewWriter(func(p []byte) error {
request.Data = p
if err := stream.Send(request); err != nil {