aboutsummaryrefslogtreecommitdiff
path: root/objectstore/loose/store.go
diff options
context:
space:
mode:
authorGravatar Runxi Yu2026-03-25 14:30:31 +0000
committerGravatar Runxi Yu2026-03-25 14:30:31 +0000
commitbfa0a3f5f18b752a6ebd3d5b37411c6871f7bb17 (patch)
tree8ee2479273e2b34d284c30703c2be48efe197556 /objectstore/loose/store.go
parent*: Resort import order (diff)
signatureNo signature
*: objectstore -> object/store
Diffstat (limited to 'objectstore/loose/store.go')
-rw-r--r--objectstore/loose/store.go41
1 files changed, 0 insertions, 41 deletions
diff --git a/objectstore/loose/store.go b/objectstore/loose/store.go
deleted file mode 100644
index d8eba84e..00000000
--- a/objectstore/loose/store.go
+++ /dev/null
@@ -1,41 +0,0 @@
-// Package loose provides a loose object backend (objects/XX/YYYYY..).
-package loose
-
-import (
- "os"
-
- objectid "codeberg.org/lindenii/furgit/object/id"
-)
-
-// Store reads loose Git objects from an objects directory root.
-//
-// Loose objects are zlib streams whose trailer uses Adler-32. Which reads
-// consume enough of the stream to reach and verify that trailer is documented
-// on the individual methods.
-type Store struct {
- // root is the objects directory capability used for all object file access.
- // Object files are opened by relative paths like "<first2>/<rest>".
- // Store borrows this root.
- root *os.Root
- // algo is the expected object ID algorithm for lookups.
- algo objectid.Algorithm
-}
-
-// New creates a loose-object store rooted at an objects directory for algo.
-func New(root *os.Root, algo objectid.Algorithm) (*Store, error) {
- if algo.Size() == 0 {
- return nil, objectid.ErrInvalidAlgorithm
- }
-
- return &Store{
- root: root,
- algo: algo,
- }, nil
-}
-
-// Close releases resources associated with the backend.
-//
-// Store borrows its root, so Close does not close it.
-//
-// Repeated calls to Close are undefined behavior.
-func (store *Store) Close() error { return nil }