···11package files
2233// Close releases resources associated with the store.
44-//
55-// Store borrows gitRoot, so Close does not close it.
66-// Transactions and batches borrowing the store are invalid after Close.
77-//
88-// Repeated calls to Close are undefined behavior.
94func (store *Store) Close() error {
105 return store.commonRoot.Close()
116}
+2
ref/store/files/new.go
···99)
10101111// New creates one files ref store rooted at one repository gitdir.
1212+//
1313+// Labels: Deps-Borrowed.
1214func New(root *os.Root, algo objectid.Algorithm, packedRefsTimeout time.Duration) (*Store, error) {
1315 if algo.Size() == 0 {
1416 return nil, objectid.ErrInvalidAlgorithm
+1-2
ref/store/files/store.go
···1414// Store reads and writes one Git files ref namespace rooted at one repository
1515// gitdir plus its commondir.
1616//
1717-// Store borrows gitRoot and owns commonRoot. Close releases only resources
1818-// opened by the store itself.
1717+// Labels: Close-Caller.
1918type Store struct {
2019 gitRoot *os.Root
2120 commonRoot *os.Root
+1
ref/store/files/transaction.go
···44 refstore "codeberg.org/lindenii/furgit/ref/store"
55)
6677+// Transaction stages files-store updates for one atomic commit.
78type Transaction struct {
89 store *Store
910 ops []queuedUpdate