ref: da6764565629b0376f8d505bdd9d5fdc9c567f93
parent: 1999e34a96a4b000a53e5f7565e2a5b0d61a90f4
author: Runxi Yu <runxiyu@umich.edu>
date: Mon Mar 30 22:40:34 EDT 2026
ref/store: Simplify names
--- a/network/receivepack/hook.go
+++ b/network/receivepack/hook.go
@@ -34,7 +34,7 @@
//
// Labels: Life-Call.
type HookRequest struct {- Refs refstore.ReadingStore
+ Refs refstore.Reader
ExistingObjects objectstore.Reader
// QuarantinedObjects exposes quarantined objects for this push.
//
--- a/network/receivepack/options.go
+++ b/network/receivepack/options.go
@@ -22,9 +22,9 @@
Algorithm objectid.Algorithm
// Refs is the reference store visible to the push.
Refs interface {- refstore.ReadingStore
- refstore.TransactionalStore
- refstore.BatchStore
+ refstore.Reader
+ refstore.Transactioner
+ refstore.Batcher
}
// ExistingObjects is the object store visible to the push before any newly
// uploaded quarantined objects are promoted.
--- a/network/receivepack/service/hook.go
+++ b/network/receivepack/service/hook.go
@@ -30,7 +30,7 @@
//
// Labels: Life-Call.
type HookRequest struct {- Refs refstore.ReadingStore
+ Refs refstore.Reader
ExistingObjects objectstore.Reader
// QuarantinedObjects exposes quarantined objects for this push.
//
--- a/network/receivepack/service/options.go
+++ b/network/receivepack/service/options.go
@@ -18,9 +18,9 @@
// borrowed for the duration of Execute.
type Options struct { Refs interface {- refstore.ReadingStore
- refstore.TransactionalStore
- refstore.BatchStore
+ refstore.Reader
+ refstore.Transactioner
+ refstore.Batcher
}
ExistingObjects objectstore.Reader
ObjectIngress objectstore.Quarantiner
--- a/ref/store/batch_store.go
+++ b/ref/store/batch_store.go
@@ -1,7 +1,7 @@
package refstore
-// BatchStore begins non-atomic reference batches.
-type BatchStore interface {+// Batcher begins non-atomic reference batches.
+type Batcher interface {// BeginBatch creates one new queued batch.
//
// Labels: Life-Parent.
--- a/ref/store/chain/chain.go
+++ b/ref/store/chain/chain.go
@@ -8,5 +8,5 @@
//
// Labels: Close-Caller.
type Chain struct {- backends []refstore.ReadingStore
+ backends []refstore.Reader
}
--- a/ref/store/chain/new.go
+++ b/ref/store/chain/new.go
@@ -7,8 +7,8 @@
// The provided backends must be non-nil and distinct.
//
// Labels: Deps-Borrowed, Life-Parent.
-func New(backends ...refstore.ReadingStore) *Chain {+func New(backends ...refstore.Reader) *Chain { return &Chain{- backends: append([]refstore.ReadingStore(nil), backends...),
+ backends: append([]refstore.Reader(nil), backends...),
}
}
--- a/ref/store/files/store.go
+++ b/ref/store/files/store.go
@@ -25,7 +25,7 @@
}
var (
- _ refstore.ReadingStore = (*Store)(nil)
- _ refstore.TransactionalStore = (*Store)(nil)
- _ refstore.BatchStore = (*Store)(nil)
+ _ refstore.Reader = (*Store)(nil)
+ _ refstore.Transactioner = (*Store)(nil)
+ _ refstore.Batcher = (*Store)(nil)
)
--- a/ref/store/reading.go
+++ b/ref/store/reading.go
@@ -2,10 +2,10 @@
import "codeberg.org/lindenii/furgit/ref"
-// ReadingStore reads Git references.
+// Reader reads Git references.
//
// Labels: MT-Safe.
-type ReadingStore interface {+type Reader interface {// Resolve resolves a reference name to either a symbolic or detached ref.
//
// Implementations should return value forms ([ref.Detached] or [ref.Symbolic]),
--- a/ref/store/transactional_store.go
+++ b/ref/store/transactional_store.go
@@ -1,11 +1,11 @@
package refstore
-// TransactionalStore begins atomic reference transactions.
+// Transactioner begins atomic reference transactions.
//
// Not every readable reference store is writable. Implementations should only
-// satisfy TransactionalStore when they can stage and commit reference updates
+// satisfy Transactioner when they can stage and commit reference updates
// atomically within that backend.
-type TransactionalStore interface {+type Transactioner interface {// BeginTransaction creates one new mutable transaction.
//
// Labels: Life-Parent.
--- a/repository/refs.go
+++ b/repository/refs.go
@@ -12,9 +12,9 @@
//
//nolint:ireturn
func (repo *Repository) Refs() interface {- refstore.ReadingStore
- refstore.TransactionalStore
- refstore.BatchStore
+ refstore.Reader
+ refstore.Transactioner
+ refstore.Batcher
} {return repo.refs
}
--- a/repository/repository.go
+++ b/repository/repository.go
@@ -42,8 +42,8 @@
commitQueries *commitquery.Queries
refRoot *os.Root
refs interface {- refstore.ReadingStore
- refstore.TransactionalStore
- refstore.BatchStore
+ refstore.Reader
+ refstore.Transactioner
+ refstore.Batcher
}
}
--
⑨