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: Reorganize files

Runxi Yu ce22af5e 788553de

+37 -34
-28
object/store/quarantine.go
··· 11 11 // Discard abandons quarantined writes. 12 12 Discard() error 13 13 } 14 - 15 - // ObjectQuarantine represents one quarantined object-wise write. 16 - type ObjectQuarantine interface { 17 - Quarantine 18 - ObjectWriter 19 - } 20 - 21 - // PackQuarantine represents one quarantined pack-wise write. 22 - type PackQuarantine interface { 23 - Quarantine 24 - PackWriter 25 - } 26 - 27 - // ObjectQuarantineOptions controls the options for one object quarantine creation. 28 - type ObjectQuarantineOptions struct{} 29 - 30 - // PackQuarantineOptions controls the options for one pack quarantine creation. 31 - type PackQuarantineOptions struct{} 32 - 33 - // ObjectQuarantiner creates quarantines for object-wise writes. 34 - type ObjectQuarantiner interface { 35 - BeginObjectQuarantine(opts ObjectQuarantineOptions) (ObjectQuarantine, error) 36 - } 37 - 38 - // PackQuarantiner creates quarantines for pack-wise writes. 39 - type PackQuarantiner interface { 40 - BeginPackQuarantine(opts PackQuarantineOptions) (PackQuarantine, error) 41 - }
+11 -6
object/store/writer.go object/store/writer_object.go
··· 22 22 WriteBytesFull(raw []byte) (objectid.ObjectID, error) 23 23 } 24 24 25 - // PackWriteOptions controls one pack write operation. 26 - type PackWriteOptions struct{} 25 + // ObjectQuarantine represents one quarantined object-wise write. 26 + type ObjectQuarantine interface { 27 + Quarantine 28 + ObjectWriter 29 + } 30 + 31 + // ObjectQuarantineOptions controls the options for one object quarantine creation. 32 + type ObjectQuarantineOptions struct{} 27 33 28 - // PackWriter writes Git pack streams. 29 - type PackWriter interface { 30 - // WritePack ingests one pack stream. 31 - WritePack(src io.Reader, opts PackWriteOptions) error 34 + // ObjectQuarantiner creates quarantines for object-wise writes. 35 + type ObjectQuarantiner interface { 36 + BeginObjectQuarantine(opts ObjectQuarantineOptions) (ObjectQuarantine, error) 32 37 }
+26
object/store/writer_pack.go
··· 1 + package objectstore 2 + 3 + import "io" 4 + 5 + // PackWriteOptions controls one pack write operation. 6 + type PackWriteOptions struct{} 7 + 8 + // PackWriter writes Git pack streams. 9 + type PackWriter interface { 10 + // WritePack ingests one pack stream. 11 + WritePack(src io.Reader, opts PackWriteOptions) error 12 + } 13 + 14 + // PackQuarantine represents one quarantined pack-wise write. 15 + type PackQuarantine interface { 16 + Quarantine 17 + PackWriter 18 + } 19 + 20 + // PackQuarantineOptions controls the options for one pack quarantine creation. 21 + type PackQuarantineOptions struct{} 22 + 23 + // PackQuarantiner creates quarantines for pack-wise writes. 24 + type PackQuarantiner interface { 25 + BeginPackQuarantine(opts PackQuarantineOptions) (PackQuarantine, error) 26 + }