diff options
| author | 2026-03-06 18:38:44 +0800 | |
|---|---|---|
| committer | 2026-03-06 18:58:30 +0800 | |
| commit | f2922155de01b734e3e8b3f50be8f263ec13cacd (patch) | |
| tree | 6dcfcf5689e63eea09314dce543e1de26cab89fe /format/commitgraph/read/open_chain.go | |
| parent | internal/compress: Format (diff) | |
| signature | No signature | |
*: Lint v0.1.68
Diffstat (limited to 'format/commitgraph/read/open_chain.go')
| -rw-r--r-- | format/commitgraph/read/open_chain.go | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/format/commitgraph/read/open_chain.go b/format/commitgraph/read/open_chain.go index f64040bc..8d5ec268 100644 --- a/format/commitgraph/read/open_chain.go +++ b/format/commitgraph/read/open_chain.go @@ -17,7 +17,7 @@ func openChain(root *os.Root, algo objectid.Algorithm) (*Reader, error) { file, err := root.Open(chainPath) if err != nil { if errors.Is(err, os.ErrNotExist) { - return nil, &ErrMalformed{Path: chainPath, Reason: "missing commit-graph-chain"} + return nil, &MalformedError{Path: chainPath, Reason: "missing commit-graph-chain"} } return nil, err @@ -47,7 +47,7 @@ func openChain(root *os.Root, algo objectid.Algorithm) (*Reader, error) { } if len(hashes) == 0 { - return nil, &ErrMalformed{Path: chainPath, Reason: "empty chain"} + return nil, &MalformedError{Path: chainPath, Reason: "empty chain"} } layers := make([]layer, 0, len(hashes)) @@ -70,7 +70,7 @@ func openChain(root *os.Root, algo objectid.Algorithm) (*Reader, error) { if len(hashHex) != algo.HexLen() { closeLayers(layers) - return nil, &ErrMalformed{ + return nil, &MalformedError{ Path: chainPath, Reason: fmt.Sprintf("invalid graph hash length at line %d", i+1), } @@ -90,7 +90,7 @@ func openChain(root *os.Root, algo objectid.Algorithm) (*Reader, error) { closeLayers(layers) - return nil, &ErrMalformed{ + return nil, &MalformedError{ Path: relPath, Reason: fmt.Sprintf("BASE count %d does not match chain depth %d", loaded.baseCount, i), } @@ -114,7 +114,7 @@ func openChain(root *os.Root, algo objectid.Algorithm) (*Reader, error) { closeLayers(layers) - return nil, &ErrMalformed{Path: relPath, Reason: "total commit count overflow"} + return nil, &MalformedError{Path: relPath, Reason: "total commit count overflow"} } total = totalNext |
