aboutsummaryrefslogtreecommitdiff
path: root/object
diff options
context:
space:
mode:
Diffstat (limited to 'object')
-rw-r--r--object/commit/parse.go2
-rw-r--r--object/header/parse.go1
-rw-r--r--object/signature/parse.go2
-rw-r--r--object/store/reader.go9
-rw-r--r--object/typ/errors.go1
5 files changed, 8 insertions, 7 deletions
diff --git a/object/commit/parse.go b/object/commit/parse.go
index 1e99ec48..f58b39ec 100644
--- a/object/commit/parse.go
+++ b/object/commit/parse.go
@@ -9,7 +9,7 @@ import (
"lindenii.org/go/furgit/object/signature"
)
-// ErrInvalidCommit indicates an attempt to parse an invalid commit.
+// ErrInvalidCommit indicates a malformed commit object.
var ErrInvalidCommit = errors.New("object/commit: invalid commit")
// Parse decodes a commit object body.
diff --git a/object/header/parse.go b/object/header/parse.go
index 0958c0dd..5829a755 100644
--- a/object/header/parse.go
+++ b/object/header/parse.go
@@ -9,6 +9,7 @@ import (
"lindenii.org/go/furgit/object/typ"
)
+// ErrInvalidHeader indicates a malformed loose-object header.
var ErrInvalidHeader = errors.New("object/header: invalid header")
// Parse parses a canonical loose-object header ("type size\x00").
diff --git a/object/signature/parse.go b/object/signature/parse.go
index f8c1666e..f792e27e 100644
--- a/object/signature/parse.go
+++ b/object/signature/parse.go
@@ -9,7 +9,7 @@ import (
"lindenii.org/go/lgo/intconv"
)
-// ErrInvalidSignature indicates an attempt to parse an invalid signature.
+// ErrInvalidSignature indicates a malformed signature.
var ErrInvalidSignature = errors.New("object/signature: invalid signature")
// Parse parses a canonical Git signature line.
diff --git a/object/store/reader.go b/object/store/reader.go
index 5fc76979..e8829b87 100644
--- a/object/store/reader.go
+++ b/object/store/reader.go
@@ -59,11 +59,10 @@ type ObjectReader interface {
Refresh() error
}
-// ErrObjectNotFound indicates that
-// an object does not exist in a backend.
-// This error must only be produced by object stores,
-// when it has no specified object ID,
-// but no other unexpected conditions were encountered.
+// ErrObjectNotFound indicates that an object does not exist in a backend.
+// It must only be produced by an object store
+// when the store does not contain the requested object ID
+// and no other unexpected conditions were encountered.
var ErrObjectNotFound = errors.New("object/store: object not found")
// This is a sentinel with no details,
diff --git a/object/typ/errors.go b/object/typ/errors.go
index f5880e12..db132178 100644
--- a/object/typ/errors.go
+++ b/object/typ/errors.go
@@ -2,4 +2,5 @@ package typ
import "errors"
+// ErrInvalidType indicates an unknown or unsupported Git object type.
var ErrInvalidType = errors.New("object/typ: invalid type")