aboutsummaryrefslogtreecommitdiff
path: root/format/commitgraph/read/bloom.go
diff options
context:
space:
mode:
authorGravatar Runxi Yu2026-03-06 18:38:44 +0800
committerGravatar Runxi Yu2026-03-06 18:58:30 +0800
commitf2922155de01b734e3e8b3f50be8f263ec13cacd (patch)
tree6dcfcf5689e63eea09314dce543e1de26cab89fe /format/commitgraph/read/bloom.go
parentinternal/compress: Format (diff)
signatureNo signature
*: Lint v0.1.68
Diffstat (limited to 'format/commitgraph/read/bloom.go')
-rw-r--r--format/commitgraph/read/bloom.go8
1 files changed, 4 insertions, 4 deletions
diff --git a/format/commitgraph/read/bloom.go b/format/commitgraph/read/bloom.go
index 9b66f458..e00b800f 100644
--- a/format/commitgraph/read/bloom.go
+++ b/format/commitgraph/read/bloom.go
@@ -38,7 +38,7 @@ func (reader *Reader) BloomVersion() uint8 {
// BloomFilterAt returns one commit's changed-path Bloom filter.
//
-// Returns ErrBloomUnavailable when this commit graph has no Bloom data.
+// Returns BloomUnavailableError when this commit graph has no Bloom data.
func (reader *Reader) BloomFilterAt(pos Position) (*bloom.Filter, error) {
layer, err := reader.layerByPosition(pos)
if err != nil {
@@ -46,7 +46,7 @@ func (reader *Reader) BloomFilterAt(pos Position) (*bloom.Filter, error) {
}
if layer.chunkBloomIndex == nil || layer.chunkBloomData == nil || layer.bloomSettings == nil {
- return nil, &ErrBloomUnavailable{Pos: pos}
+ return nil, &BloomUnavailableError{Pos: pos}
}
start, end, err := bloomRange(layer, pos.Index)
@@ -86,7 +86,7 @@ func bloomRange(layer *layer, commitIndex uint32) (int, int, error) {
}
if end < start {
- return 0, 0, &ErrMalformed{Path: layer.path, Reason: "invalid BIDX range"}
+ return 0, 0, &MalformedError{Path: layer.path, Reason: "invalid BIDX range"}
}
bdatLen := len(layer.chunkBloomData) - bloom.DataHeaderSize
@@ -97,7 +97,7 @@ func bloomRange(layer *layer, commitIndex uint32) (int, int, error) {
}
if end > bdatLenU32 {
- return 0, 0, &ErrMalformed{Path: layer.path, Reason: "BIDX range out of BDAT bounds"}
+ return 0, 0, &MalformedError{Path: layer.path, Reason: "BIDX range out of BDAT bounds"}
}
startInt, err := intconv.Uint64ToInt(uint64(start))