Fast implementation of Git in pure Go codeberg.org/lindenii/furgit
git go
6
fork

Configure Feed

Select the types of activity you want to include in your feed.

object/store/packed: Rename Base to ThinBase

Runxi Yu ff4f4633 07eba7b5

+6 -6
+1 -1
object/store/packed/internal/ingest/ingest_test.go
··· 280 280 result, err := writePack(bytes.NewReader(thinPack), packRoot, algo, ingest.Options{ 281 281 FixThin: true, 282 282 WriteRev: true, 283 - Base: receiverRepo.Objects(), 283 + ThinBase: receiverRepo.Objects(), 284 284 RequireTrailingEOF: true, 285 285 }) 286 286 if err != nil {
+2 -2
object/store/packed/internal/ingest/options.go
··· 11 11 FixThin bool 12 12 // WriteRev writes a .rev alongside the .pack and .idx. 13 13 WriteRev bool 14 - // Base supplies existing objects for thin-pack fixup. 15 - Base objectstore.Reader 14 + // ThinBase supplies existing objects for thin-pack fixup. 15 + ThinBase objectstore.Reader 16 16 // Progress receives human-readable progress messages. 17 17 // 18 18 // When nil, no progress output is emitted.
+2 -2
object/store/packed/internal/ingest/thin_fix.go
··· 25 25 return &ThinPackUnresolvedError{Count: len(state.unresolvedRefDeltas)} 26 26 } 27 27 28 - if state.opts.Base == nil { 28 + if state.opts.ThinBase == nil { 29 29 return &ThinPackUnresolvedError{Count: len(state.unresolvedRefDeltas)} 30 30 } 31 31 ··· 68 68 var appended uint64 69 69 70 70 for _, id := range baseIDs { 71 - ty, content, err := state.opts.Base.ReadBytesContent(id) 71 + ty, content, err := state.opts.ThinBase.ReadBytesContent(id) 72 72 if err != nil { 73 73 if errors.Is(err, objectstore.ErrObjectNotFound) { 74 74 continue
+1 -1
object/store/packed/writer.go
··· 13 13 func (store *Store) WritePack(src io.Reader, opts objectstore.PackWriteOptions) error { 14 14 _, err := ingest.WritePack(store.root, store.algo, src, ingest.Options{ 15 15 WriteRev: store.opts.WriteRev, 16 - Base: opts.ThinBase, 16 + ThinBase: opts.ThinBase, 17 17 Progress: opts.Progress, 18 18 RequireTrailingEOF: opts.RequireTrailingEOF, 19 19 })