From 3e884f5f3d42cbc4874a04da31dde10314b0cfad Mon Sep 17 00:00:00 2001 From: Runxi Yu Date: Thu, 26 Mar 2026 09:17:14 +0000 Subject: format: Move commitgraph and packfile here --- commitgraph/read/errors.go | 58 ---------------------------------------------- 1 file changed, 58 deletions(-) delete mode 100644 commitgraph/read/errors.go (limited to 'commitgraph/read/errors.go') diff --git a/commitgraph/read/errors.go b/commitgraph/read/errors.go deleted file mode 100644 index 0a32a368..00000000 --- a/commitgraph/read/errors.go +++ /dev/null @@ -1,58 +0,0 @@ -package read - -import ( - "fmt" - - objectid "codeberg.org/lindenii/furgit/object/id" -) - -// 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("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("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("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("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("commitgraph: bloom unavailable at position graph=%d index=%d", err.Pos.Graph, err.Pos.Index) -} -- cgit v1.3.1-10-gc9f91