aboutsummaryrefslogtreecommitdiff
path: root/refstore/files/batch_begin.go
diff options
context:
space:
mode:
authorGravatar Runxi Yu2026-03-07 19:37:20 +0800
committerGravatar Runxi Yu2026-03-07 19:37:20 +0800
commit563a4dfb78aaa97febd0763e9f81a740af0dd666 (patch)
treef7ede5d05f1363021fa5b1902e9e569c2b274bf1 /refstore/files/batch_begin.go
parentrefstore: Batch should also be staged (diff)
signatureNo signature
refstore/files: Implement batching
Diffstat (limited to 'refstore/files/batch_begin.go')
-rw-r--r--refstore/files/batch_begin.go13
1 files changed, 13 insertions, 0 deletions
diff --git a/refstore/files/batch_begin.go b/refstore/files/batch_begin.go
new file mode 100644
index 00000000..d45af9d3
--- /dev/null
+++ b/refstore/files/batch_begin.go
@@ -0,0 +1,13 @@
+package files
+
+import "codeberg.org/lindenii/furgit/refstore"
+
+// BeginBatch creates one new files batch.
+//
+//nolint:ireturn
+func (store *Store) BeginBatch() (refstore.Batch, error) {
+ return &Batch{
+ store: store,
+ ops: make([]txOp, 0, 8),
+ }, nil
+}