aboutsummaryrefslogtreecommitdiff
path: root/object/store/writer_pack.go
diff options
context:
space:
mode:
Diffstat (limited to 'object/store/writer_pack.go')
-rw-r--r--object/store/writer_pack.go36
1 files changed, 34 insertions, 2 deletions
diff --git a/object/store/writer_pack.go b/object/store/writer_pack.go
index 25c1e8d9..85ce676e 100644
--- a/object/store/writer_pack.go
+++ b/object/store/writer_pack.go
@@ -1,9 +1,41 @@
package objectstore
-import "io"
+import (
+ "io"
+
+ "codeberg.org/lindenii/furgit/common/iowrap"
+)
// PackWriteOptions controls one pack write operation.
-type PackWriteOptions struct{}
+type PackWriteOptions struct {
+ // ThinBase supplies the wider object reader used to complete thin packs
+ // during ingestion.
+ //
+ // This is an option for the write operation rather than on a particular
+ // pack-backed store because any pack-accepting store is not generally
+ // expected to know the entire repository object universe around it.
+ // In a normal repository, thin bases usually come from a broader view
+ // such as mix(loose, packed), and should not be treated as a property of
+ // the destination pack-accepting store. Thus, in almost all pack-ingesting
+ // operations, a thin base reader would be required, and hence it is
+ // included here.
+ //
+ // When nil, external thin-base repair is disabled and unresolved thin deltas
+ // fail ingestion.
+ ThinBase Reader
+
+ // Progress receives human-readable progress messages.
+ //
+ // When nil, no progress output is emitted.
+ Progress iowrap.WriteFlusher
+
+ // RequireTrailingEOF requires the source to hit EOF after the pack trailer.
+ //
+ // This is suitable for exact pack-file readers, but should be disabled for
+ // full-duplex transport streams like receive-pack where the peer keeps the
+ // connection open to read the server response.
+ RequireTrailingEOF bool
+}
// PackWriter writes Git pack streams.
type PackWriter interface {