aboutsummaryrefslogtreecommitdiff
path: root/object/store/packed/writer.go
diff options
context:
space:
mode:
authorGravatar Runxi Yu2026-03-30 14:28:13 +0000
committerGravatar Runxi Yu2026-03-30 14:28:13 +0000
commita4eeb727468a178a4de0dfc718828f26740484ac (patch)
tree4318d38d49facc80e2e2186f5919fa656be3b31f /object/store/packed/writer.go
parentobject/store/packed: Make store own root, algo, opts (diff)
signatureNo signature
object,store/packed{,/internal/ingest}: Move from format/packfile/ingest
Diffstat (limited to 'object/store/packed/writer.go')
-rw-r--r--object/store/packed/writer.go17
1 files changed, 17 insertions, 0 deletions
diff --git a/object/store/packed/writer.go b/object/store/packed/writer.go
new file mode 100644
index 00000000..28867291
--- /dev/null
+++ b/object/store/packed/writer.go
@@ -0,0 +1,17 @@
+package packed
+
+import (
+ "io"
+
+ objectstore "codeberg.org/lindenii/furgit/object/store"
+ "codeberg.org/lindenii/furgit/object/store/packed/internal/ingest"
+)
+
+var _ objectstore.PackWriter = (*Store)(nil)
+
+// WritePack ingests one pack stream into the packed store.
+func (store *Store) WritePack(src io.Reader, _ objectstore.PackWriteOptions) error {
+ _, err := ingest.WritePack(store.root, store.algo, src, ingest.Options{})
+
+ return err
+}