ref: d298ab6caba5f1e70c58155f4efa33ef2d16a1c2
parent: 37ea961e9c054ad162daa5da47f23ace0adbacab
author: Runxi Yu <runxiyu@umich.edu>
date: Mon Mar 30 13:48:08 EDT 2026
ref/store: Remove ReadWriteStore
--- a/network/receivepack/options.go
+++ b/network/receivepack/options.go
@@ -23,7 +23,11 @@
// Algorithm is the repository object ID algorithm used by the push session.
Algorithm objectid.Algorithm
// Refs is the reference store visible to the push.
- Refs refstore.ReadWriteStore
+ Refs interface {+ refstore.ReadingStore
+ refstore.TransactionalStore
+ refstore.BatchStore
+ }
// ExistingObjects is the object store visible to the push before any newly
// uploaded quarantined objects are promoted.
ExistingObjects objectstore.Reader
--- a/network/receivepack/service/options.go
+++ b/network/receivepack/service/options.go
@@ -25,8 +25,12 @@
// Progress, Hook, and HookIO are optional; when provided they are also
// borrowed for the duration of Execute.
type Options struct {- Algorithm objectid.Algorithm
- Refs refstore.ReadWriteStore
+ Algorithm objectid.Algorithm
+ Refs interface {+ refstore.ReadingStore
+ refstore.TransactionalStore
+ refstore.BatchStore
+ }
ExistingObjects objectstore.Reader
CommitGraph *commitgraphread.Reader
ObjectsRoot *os.Root
--- a/ref/store/read_write_store.go
+++ /dev/null
@@ -1,8 +1,0 @@
-package refstore
-
-// ReadWriteStore supports reading, atomic transactions, and non-atomic batches.
-type ReadWriteStore interface {- ReadingStore
- TransactionalStore
- BatchStore
-}
--- a/repository/refs.go
+++ b/repository/refs.go
@@ -11,6 +11,10 @@
// Labels: Life-Parent.
//
//nolint:ireturn
-func (repo *Repository) Refs() refstore.ReadWriteStore {+func (repo *Repository) Refs() interface {+ refstore.ReadingStore
+ refstore.TransactionalStore
+ refstore.BatchStore
+} {return repo.refs
}
--- a/repository/repository.go
+++ b/repository/repository.go
@@ -41,5 +41,9 @@
commitGraph *commitgraphread.Reader
commitQueries *commitquery.Queries
refRoot *os.Root
- refs refstore.ReadWriteStore
+ refs interface {+ refstore.ReadingStore
+ refstore.TransactionalStore
+ refstore.BatchStore
+ }
}
--
⑨