shithub: furgit

Download patch

ref: ff4f4633d3896006616313038e7322ed7c4ced8c
parent: 07eba7b54d3836e76996c0b06714b6e505bead5e
author: Runxi Yu <runxiyu@umich.edu>
date: Mon Mar 30 11:20:21 EDT 2026

object/store/packed: Rename Base to ThinBase

--- a/object/store/packed/internal/ingest/ingest_test.go
+++ b/object/store/packed/internal/ingest/ingest_test.go
@@ -280,7 +280,7 @@
 		result, err := writePack(bytes.NewReader(thinPack), packRoot, algo, ingest.Options{
 			FixThin:            true,
 			WriteRev:           true,
-			Base:               receiverRepo.Objects(),
+			ThinBase:           receiverRepo.Objects(),
 			RequireTrailingEOF: true,
 		})
 		if err != nil {
--- a/object/store/packed/internal/ingest/options.go
+++ b/object/store/packed/internal/ingest/options.go
@@ -11,8 +11,8 @@
 	FixThin bool
 	// WriteRev writes a .rev alongside the .pack and .idx.
 	WriteRev bool
-	// Base supplies existing objects for thin-pack fixup.
-	Base objectstore.Reader
+	// ThinBase supplies existing objects for thin-pack fixup.
+	ThinBase objectstore.Reader
 	// Progress receives human-readable progress messages.
 	//
 	// When nil, no progress output is emitted.
--- a/object/store/packed/internal/ingest/thin_fix.go
+++ b/object/store/packed/internal/ingest/thin_fix.go
@@ -25,7 +25,7 @@
 		return &ThinPackUnresolvedError{Count: len(state.unresolvedRefDeltas)}
 	}
 
-	if state.opts.Base == nil {
+	if state.opts.ThinBase == nil {
 		return &ThinPackUnresolvedError{Count: len(state.unresolvedRefDeltas)}
 	}
 
@@ -68,7 +68,7 @@
 	var appended uint64
 
 	for _, id := range baseIDs {
-		ty, content, err := state.opts.Base.ReadBytesContent(id)
+		ty, content, err := state.opts.ThinBase.ReadBytesContent(id)
 		if err != nil {
 			if errors.Is(err, objectstore.ErrObjectNotFound) {
 				continue
--- a/object/store/packed/writer.go
+++ b/object/store/packed/writer.go
@@ -13,7 +13,7 @@
 func (store *Store) WritePack(src io.Reader, opts objectstore.PackWriteOptions) error {
 	_, err := ingest.WritePack(store.root, store.algo, src, ingest.Options{
 		WriteRev:           store.opts.WriteRev,
-		Base:               opts.ThinBase,
+		ThinBase:           opts.ThinBase,
 		Progress:           opts.Progress,
 		RequireTrailingEOF: opts.RequireTrailingEOF,
 	})
--