diff options
| author | 2026-03-10 13:30:48 +0800 | |
|---|---|---|
| committer | 2026-03-10 13:30:48 +0800 | |
| commit | 73e602a5c2c766caba59948e91c11122653705ec (patch) | |
| tree | 57951a4275dd90c2b3953e5b4bf3c9a7bd09b84a /format/commitgraph/read/errors.go | |
| parent | *: Move sideband64k and pktline to protocol/ (diff) | |
| signature | No signature | |
commitgraph: Move out of format/
Diffstat (limited to 'format/commitgraph/read/errors.go')
| -rw-r--r-- | format/commitgraph/read/errors.go | 58 |
1 files changed, 0 insertions, 58 deletions
diff --git a/format/commitgraph/read/errors.go b/format/commitgraph/read/errors.go deleted file mode 100644 index 8dd02a60..00000000 --- a/format/commitgraph/read/errors.go +++ /dev/null @@ -1,58 +0,0 @@ -package read - -import ( - "fmt" - - "codeberg.org/lindenii/furgit/objectid" -) - -// NotFoundError reports a missing commit graph entry by object ID. -type NotFoundError struct { - OID objectid.ObjectID -} - -// Error implements error. -func (err *NotFoundError) Error() string { - return fmt.Sprintf("format/commitgraph: object not found: %s", err.OID) -} - -// PositionOutOfRangeError reports an invalid graph position. -type PositionOutOfRangeError struct { - Pos Position -} - -// Error implements error. -func (err *PositionOutOfRangeError) Error() string { - return fmt.Sprintf("format/commitgraph: position out of range: graph=%d index=%d", err.Pos.Graph, err.Pos.Index) -} - -// MalformedError reports malformed commit-graph data. -type MalformedError struct { - Path string - Reason string -} - -// Error implements error. -func (err *MalformedError) Error() string { - return fmt.Sprintf("format/commitgraph: malformed %q: %s", err.Path, err.Reason) -} - -// UnsupportedVersionError reports unsupported commit-graph version. -type UnsupportedVersionError struct { - Version uint8 -} - -// Error implements error. -func (err *UnsupportedVersionError) Error() string { - return fmt.Sprintf("format/commitgraph: unsupported version %d", err.Version) -} - -// BloomUnavailableError reports missing changed-path bloom data at one position. -type BloomUnavailableError struct { - Pos Position -} - -// Error implements error. -func (err *BloomUnavailableError) Error() string { - return fmt.Sprintf("format/commitgraph: bloom unavailable at position graph=%d index=%d", err.Pos.Graph, err.Pos.Index) -} |
