From c2cb06aa23a1769a0d84756acccf1ac1358f61ef Mon Sep 17 00:00:00 2001 From: Runxi Yu Date: Tue, 10 Mar 2026 14:07:54 +0800 Subject: *: format/pack -> packfile; format/delta -> delta; delete format --- format/pack/ingest/state.go | 70 --------------------------------------------- 1 file changed, 70 deletions(-) delete mode 100644 format/pack/ingest/state.go (limited to 'format/pack/ingest/state.go') diff --git a/format/pack/ingest/state.go b/format/pack/ingest/state.go deleted file mode 100644 index d44b6e09..00000000 --- a/format/pack/ingest/state.go +++ /dev/null @@ -1,70 +0,0 @@ -package ingest - -import ( - "io" - "os" - - "codeberg.org/lindenii/furgit/objectid" -) - -const ( - defaultDeltaBaseCacheMaxBytes = 32 << 20 -) - -// ingestState holds mutable state for one Ingest call. -type ingestState struct { - src io.Reader - destination *os.Root - algo objectid.Algorithm - opts Options - - packHeaderRaw [packHeaderSize]byte - - packFile *os.File - packTmpName string - idxFile *os.File - idxTmpName string - revFile *os.File - revTmpName string - - stream *streamScanner - - records []objectRecord - ofsDeltas []ofsDeltaRef - refDeltas []refDeltaRef - unresolvedRefDeltas []int - offsetToRecord map[uint64]int - objectToRecord map[objectid.ObjectID]int - - baseCache *deltaBaseCache - packHash objectid.ObjectID - - objectCountHeader uint32 - thinFixed bool -} - -// newIngestState constructs one call-local ingest state. -func newIngestState( - src io.Reader, - destination *os.Root, - algo objectid.Algorithm, - opts Options, - header HeaderInfo, - headerRaw [packHeaderSize]byte, -) (*ingestState, error) { - if algo.Size() == 0 { - return nil, objectid.ErrInvalidAlgorithm - } - - return &ingestState{ - src: src, - destination: destination, - algo: algo, - opts: opts, - packHeaderRaw: headerRaw, - objectCountHeader: header.ObjectCount, - offsetToRecord: make(map[uint64]int), - objectToRecord: make(map[objectid.ObjectID]int), - baseCache: newDeltaBaseCache(defaultDeltaBaseCacheMaxBytes), - }, nil -} -- cgit v1.3.1-10-gc9f91