aboutsummaryrefslogtreecommitdiff
path: root/format/pack/ingest/state.go
diff options
context:
space:
mode:
authorGravatar Runxi Yu2026-03-07 23:35:28 +0800
committerGravatar Runxi Yu2026-03-07 23:35:28 +0800
commitb279c7e4dc798b4c8055af8e974edbc8973d4537 (patch)
tree1710e154f86d391a2f6789e37318fa6363d2beec /format/pack/ingest/state.go
parentinternal/testgit: Add more execution helpers (diff)
signatureNo signature
format/pack/ingest: Use Options; don't require EOF
Diffstat (limited to 'format/pack/ingest/state.go')
-rw-r--r--format/pack/ingest/state.go13
1 files changed, 3 insertions, 10 deletions
diff --git a/format/pack/ingest/state.go b/format/pack/ingest/state.go
index 2263e8a1..cbc412e3 100644
--- a/format/pack/ingest/state.go
+++ b/format/pack/ingest/state.go
@@ -5,7 +5,6 @@ import (
"os"
"codeberg.org/lindenii/furgit/objectid"
- "codeberg.org/lindenii/furgit/objectstore"
)
const (
@@ -17,9 +16,7 @@ type ingestState struct {
src io.Reader
destination *os.Root
algo objectid.Algorithm
- fixThin bool
- writeRev bool
- base objectstore.Store
+ opts Options
packFile *os.File
packTmpName string
@@ -49,9 +46,7 @@ func newIngestState(
src io.Reader,
destination *os.Root,
algo objectid.Algorithm,
- fixThin bool,
- writeRev bool,
- base objectstore.Store,
+ opts Options,
) (*ingestState, error) {
if algo.Size() == 0 {
return nil, objectid.ErrInvalidAlgorithm
@@ -61,9 +56,7 @@ func newIngestState(
src: src,
destination: destination,
algo: algo,
- fixThin: fixThin,
- writeRev: writeRev,
- base: base,
+ opts: opts,
offsetToRecord: make(map[uint64]int),
objectToRecord: make(map[objectid.ObjectID]int),
baseCache: newDeltaBaseCache(defaultDeltaBaseCacheMaxBytes),