aboutsummaryrefslogtreecommitdiff
path: root/object/store/packed/trailer_match.go
diff options
context:
space:
mode:
authorGravatar Runxi Yu2026-03-25 14:34:50 +0000
committerGravatar Runxi Yu2026-03-25 14:34:50 +0000
commite4a7aa0742f5070299d37e8421c99d67f0af3f90 (patch)
tree36d89781476a92e61280c5ff232a2773e4092c0e /object/store/packed/trailer_match.go
parent*: delta -> packfile/delta (diff)
signatureNo signature
*: object/store -> object/storer v0.1.107
Diffstat (limited to 'object/store/packed/trailer_match.go')
-rw-r--r--object/store/packed/trailer_match.go29
1 files changed, 0 insertions, 29 deletions
diff --git a/object/store/packed/trailer_match.go b/object/store/packed/trailer_match.go
deleted file mode 100644
index dc43e37d..00000000
--- a/object/store/packed/trailer_match.go
+++ /dev/null
@@ -1,29 +0,0 @@
-package packed
-
-import "fmt"
-
-// verifyPackMatchesIndexes checks that one opened pack's trailer hash matches
-// every loaded index that references the same pack name.
-func (store *Store) verifyPackMatchesIndexes(pack *packFile) error {
- snapshot, err := store.ensureCandidates()
- if err != nil {
- return err
- }
-
- candidate, ok := snapshot.candidateByPack[pack.name]
- if !ok {
- return fmt.Errorf("objectstore/packed: missing index for pack %q", pack.name)
- }
-
- index, err := store.openIndex(candidate)
- if err != nil {
- return err
- }
-
- err = verifyMappedPackMatchesMappedIdx(pack.data, index.data, store.algo)
- if err != nil {
- return fmt.Errorf("objectstore/packed: pack %q does not match idx %q: %w", pack.name, index.idxName, err)
- }
-
- return nil
-}