From 507734bd74a7aeac55db96986fbbd6aba61e44df Mon Sep 17 00:00:00 2001 From: Runxi Yu Date: Thu, 11 Jun 2026 08:06:28 +0000 Subject: object/store/packed: Comment everything out Otherwise I can't really run my linter and I miss many things --- object/store/packed/packed.go | 62 +++++++++++----------- object/store/packed/quarantine.go | 108 +++++++++++++++++++------------------- object/store/packed/reader.go | 56 ++++++++++---------- object/store/packed/writer.go | 16 +++--- 4 files changed, 121 insertions(+), 121 deletions(-) (limited to 'object') diff --git a/object/store/packed/packed.go b/object/store/packed/packed.go index a70f9967..c0961508 100644 --- a/object/store/packed/packed.go +++ b/object/store/packed/packed.go @@ -1,36 +1,36 @@ package packed -import ( - "os" - - "lindenii.org/go/furgit/object/id" - "lindenii.org/go/furgit/object/store" -) - -// Packed reads Git objects from pack/index files under an objects/pack root, -// and ingests incoming pack streams into it. +// import ( +// "os" // -// Labels: Close-Caller. -type Packed struct { - // root is the objects/pack directory capability - // used for all pack and index file access. - // Packed borrows this root. - root *os.Root - // objectFormat is the expected object format for lookups. - objectFormat id.ObjectFormat -} - -var ( - _ store.ObjectReader = (*Packed)(nil) - _ store.PackWriter = (*Packed)(nil) -) - -// New creates a packed-object store rooted at an objects/pack directory. +// "lindenii.org/go/furgit/object/id" +// "lindenii.org/go/furgit/object/store" +// ) // -// Labels: Deps-Borrowed, Life-Parent. -func New(root *os.Root, objectFormat id.ObjectFormat) (*Packed, error) - -// Close releases mapped pack/index resources associated with the store. +// // Packed reads Git objects from pack/index files under an objects/pack root, +// // and ingests incoming pack streams into it. +// // +// // Labels: Close-Caller. +// type Packed struct { +// // root is the objects/pack directory capability +// // used for all pack and index file access. +// // Packed borrows this root. +// root *os.Root +// // objectFormat is the expected object format for lookups. +// objectFormat id.ObjectFormat +// } +// +// var ( +// _ store.ObjectReader = (*Packed)(nil) +// _ store.PackWriter = (*Packed)(nil) +// ) +// +// // New creates a packed-object store rooted at an objects/pack directory. +// // +// // Labels: Deps-Borrowed, Life-Parent. +// func New(root *os.Root, objectFormat id.ObjectFormat) (*Packed, error) // -// Labels: MT-Unsafe. -func (packed *Packed) Close() error +// // Close releases mapped pack/index resources associated with the store. +// // +// // Labels: MT-Unsafe. +// func (packed *Packed) Close() error diff --git a/object/store/packed/quarantine.go b/object/store/packed/quarantine.go index aa520945..fac64402 100644 --- a/object/store/packed/quarantine.go +++ b/object/store/packed/quarantine.go @@ -1,57 +1,57 @@ package packed -import ( - "os" - - "lindenii.org/go/furgit/object/store" -) - -var ( - _ store.PackQuarantiner = (*Packed)(nil) - _ store.PackQuarantine = (*packQuarantine)(nil) -) - -// packQuarantine is one quarantined packed store -// rooted privately beneath a destination pack root. -type packQuarantine struct { - *Packed - - parent *Packed - tempName string - tempRoot *os.Root -} - -// BeginPackQuarantine creates one quarantined packed store -// rooted privately beneath the destination pack root. +// import ( +// "os" // -// Labels: Deps-Borrowed, Life-Parent, Close-No. -func (packed *Packed) BeginPackQuarantine(opts store.PackQuarantineOptions) (store.PackQuarantine, error) - -// Discard removes the quarantine -// and invalidates the receiver. -func (quarantine *packQuarantine) Discard() error - -// Promote publishes all finalized pack artifacts in the quarantine -// into the parent packed store, -// and invalidates the receiver. -func (quarantine *packQuarantine) Promote() error - -// promoteAll links every pack artifact in the quarantine -// into the parent packed store, -// in pack/rev/idx dependency order. -func (quarantine *packQuarantine) promoteAll() error - -// promoteFile links one quarantined pack artifact -// into the parent packed store, -// treating an already-present destination as success. -func (quarantine *packQuarantine) promoteFile(name string) error - -// createPackQuarantineRoot creates a private quarantine directory -// beneath parent, -// and returns its name and an os.Root over it. -func createPackQuarantineRoot(parent *os.Root) (string, *os.Root, error) - -// packPromotionPriority orders pack artifacts -// so that data files are linked -// before the index that publishes them. -func packPromotionPriority(name string) int +// "lindenii.org/go/furgit/object/store" +// ) +// +// var ( +// _ store.PackQuarantiner = (*Packed)(nil) +// _ store.PackQuarantine = (*packQuarantine)(nil) +// ) +// +// // packQuarantine is one quarantined packed store +// // rooted privately beneath a destination pack root. +// type packQuarantine struct { +// *Packed +// +// parent *Packed +// tempName string +// tempRoot *os.Root +// } +// +// // BeginPackQuarantine creates one quarantined packed store +// // rooted privately beneath the destination pack root. +// // +// // Labels: Deps-Borrowed, Life-Parent, Close-No. +// func (packed *Packed) BeginPackQuarantine(opts store.PackQuarantineOptions) (store.PackQuarantine, error) +// +// // Discard removes the quarantine +// // and invalidates the receiver. +// func (quarantine *packQuarantine) Discard() error +// +// // Promote publishes all finalized pack artifacts in the quarantine +// // into the parent packed store, +// // and invalidates the receiver. +// func (quarantine *packQuarantine) Promote() error +// +// // promoteAll links every pack artifact in the quarantine +// // into the parent packed store, +// // in pack/rev/idx dependency order. +// func (quarantine *packQuarantine) promoteAll() error +// +// // promoteFile links one quarantined pack artifact +// // into the parent packed store, +// // treating an already-present destination as success. +// func (quarantine *packQuarantine) promoteFile(name string) error +// +// // createPackQuarantineRoot creates a private quarantine directory +// // beneath parent, +// // and returns its name and an os.Root over it. +// func createPackQuarantineRoot(parent *os.Root) (string, *os.Root, error) +// +// // packPromotionPriority orders pack artifacts +// // so that data files are linked +// // before the index that publishes them. +// func packPromotionPriority(name string) int diff --git a/object/store/packed/reader.go b/object/store/packed/reader.go index c876b2ef..a7c38d61 100644 --- a/object/store/packed/reader.go +++ b/object/store/packed/reader.go @@ -1,30 +1,30 @@ package packed -import ( - "io" - - "lindenii.org/go/furgit/object/id" - "lindenii.org/go/furgit/object/typ" -) - -// ReadBytesFull reads a full serialized object as "type size\x00content". -func (packed *Packed) ReadBytesFull(objectID id.ObjectID) ([]byte, error) - -// ReadBytesContent reads an object's type and content bytes. -func (packed *Packed) ReadBytesContent(objectID id.ObjectID) (typ.Type, []byte, error) - -// ReadReaderFull reads a full serialized object stream as "type size\x00content". -func (packed *Packed) ReadReaderFull(objectID id.ObjectID) (io.ReadCloser, error) - -// ReadReaderContent reads an object's type, declared content length, -// and content stream. -func (packed *Packed) ReadReaderContent(objectID id.ObjectID) (typ.Type, uint64, io.ReadCloser, error) - -// ReadSize reads an object's declared content length. -func (packed *Packed) ReadSize(objectID id.ObjectID) (uint64, error) - -// ReadHeader reads an object's type and declared content length. -func (packed *Packed) ReadHeader(objectID id.ObjectID) (typ.Type, uint64, error) - -// Refresh updates the packed-store view of on-disk pack/index candidates. -func (packed *Packed) Refresh() error +// import ( +// "io" +// +// "lindenii.org/go/furgit/object/id" +// "lindenii.org/go/furgit/object/typ" +// ) +// +// // ReadBytesFull reads a full serialized object as "type size\x00content". +// func (packed *Packed) ReadBytesFull(objectID id.ObjectID) ([]byte, error) +// +// // ReadBytesContent reads an object's type and content bytes. +// func (packed *Packed) ReadBytesContent(objectID id.ObjectID) (typ.Type, []byte, error) +// +// // ReadReaderFull reads a full serialized object stream as "type size\x00content". +// func (packed *Packed) ReadReaderFull(objectID id.ObjectID) (io.ReadCloser, error) +// +// // ReadReaderContent reads an object's type, declared content length, +// // and content stream. +// func (packed *Packed) ReadReaderContent(objectID id.ObjectID) (typ.Type, uint64, io.ReadCloser, error) +// +// // ReadSize reads an object's declared content length. +// func (packed *Packed) ReadSize(objectID id.ObjectID) (uint64, error) +// +// // ReadHeader reads an object's type and declared content length. +// func (packed *Packed) ReadHeader(objectID id.ObjectID) (typ.Type, uint64, error) +// +// // Refresh updates the packed-store view of on-disk pack/index candidates. +// func (packed *Packed) Refresh() error diff --git a/object/store/packed/writer.go b/object/store/packed/writer.go index 48a908fd..a01bc7dd 100644 --- a/object/store/packed/writer.go +++ b/object/store/packed/writer.go @@ -1,10 +1,10 @@ package packed -import ( - "io" - - "lindenii.org/go/furgit/object/store" -) - -// WritePack ingests one pack stream into the packed store. -func (packed *Packed) WritePack(src io.Reader, opts store.PackWriteOptions) error +// import ( +// "io" +// +// "lindenii.org/go/furgit/object/store" +// ) +// +// // WritePack ingests one pack stream into the packed store. +// func (packed *Packed) WritePack(src io.Reader, opts store.PackWriteOptions) error -- cgit v1.3.1-10-gc9f91