Fast implementation of Git in pure Go codeberg.org/lindenii/furgit
git go
6
fork

Configure Feed

Select the types of activity you want to include in your feed.

object/store: Refine docs

Runxi Yu fce75106 c4b22901

+12 -15
+10
object/store/doc.go
··· 1 1 // Package objectstore provides interfaces for object storage backends. 2 2 // 3 + // Object stores only respond to object-ID queries in terms of headers (type 4 + // and size), raw bytes, and streaming payloads, but they do not parse commits, 5 + // trees, blobs, or tags into typed values. Turning stored objects into typed 6 + // objects is the job of [codeberg.org/lindenii/furgit/object/fetch]. 7 + // 8 + // This package also does not define a unified writing-store interface. 9 + // Backends have very different write models: writing one loose object is 10 + // natural, while writing one object into a packfile backend is wasteful. 11 + // A variety of writing interfaces may be added later. 12 + // 3 13 // Concrete implementations generally inherit the contract documented by the 4 14 // interfaces they satisfy. Implementation docs focus on additional guarantees 5 15 // and implementation-specific behavior.
+2 -6
object/store/errors.go
··· 3 3 import "errors" 4 4 5 5 // ErrObjectNotFound indicates that an object does not exist in a backend. 6 - // This error MUST only be used in situations where the object store has 7 - // no specified object ID, but no other unexpected conditions were 8 - // encountered. In particular, it is not suitable for situations where one 9 - // object references another (such as a tree referencing a blob) but 10 - // the latter does not exist; these situations should use a separate 11 - // error (TODO). 6 + // This error must only be produced by object stores, when it has no 7 + // specified object ID, but no other unexpected conditions were encountered. 12 8 var ErrObjectNotFound = errors.New("objectstore: object not found")
-9
object/store/writing.go
··· 1 - package objectstore 2 - 3 - // There is currently no writing-store interface because different 4 - // object store backends have very different models for writing. 5 - // For example, a loose object store can trivially write single loose 6 - // objects, but writing individual objects to a packfile store would 7 - // be extremely wasteful. 8 - // 9 - // At some time, we will have writing-store interfaces.