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.

ref/store: Remove ReadWriteStore

Runxi Yu d298ab6c 37ea961e

+21 -13
+5 -1
network/receivepack/options.go
··· 23 23 // Algorithm is the repository object ID algorithm used by the push session. 24 24 Algorithm objectid.Algorithm 25 25 // Refs is the reference store visible to the push. 26 - Refs refstore.ReadWriteStore 26 + Refs interface { 27 + refstore.ReadingStore 28 + refstore.TransactionalStore 29 + refstore.BatchStore 30 + } 27 31 // ExistingObjects is the object store visible to the push before any newly 28 32 // uploaded quarantined objects are promoted. 29 33 ExistingObjects objectstore.Reader
+6 -2
network/receivepack/service/options.go
··· 25 25 // Progress, Hook, and HookIO are optional; when provided they are also 26 26 // borrowed for the duration of Execute. 27 27 type Options struct { 28 - Algorithm objectid.Algorithm 29 - Refs refstore.ReadWriteStore 28 + Algorithm objectid.Algorithm 29 + Refs interface { 30 + refstore.ReadingStore 31 + refstore.TransactionalStore 32 + refstore.BatchStore 33 + } 30 34 ExistingObjects objectstore.Reader 31 35 CommitGraph *commitgraphread.Reader 32 36 ObjectsRoot *os.Root
-8
ref/store/read_write_store.go
··· 1 - package refstore 2 - 3 - // ReadWriteStore supports reading, atomic transactions, and non-atomic batches. 4 - type ReadWriteStore interface { 5 - ReadingStore 6 - TransactionalStore 7 - BatchStore 8 - }
+5 -1
repository/refs.go
··· 11 11 // Labels: Life-Parent. 12 12 // 13 13 //nolint:ireturn 14 - func (repo *Repository) Refs() refstore.ReadWriteStore { 14 + func (repo *Repository) Refs() interface { 15 + refstore.ReadingStore 16 + refstore.TransactionalStore 17 + refstore.BatchStore 18 + } { 15 19 return repo.refs 16 20 }
+5 -1
repository/repository.go
··· 41 41 commitGraph *commitgraphread.Reader 42 42 commitQueries *commitquery.Queries 43 43 refRoot *os.Root 44 - refs refstore.ReadWriteStore 44 + refs interface { 45 + refstore.ReadingStore 46 + refstore.TransactionalStore 47 + refstore.BatchStore 48 + } 45 49 }