diff options
| author | 2026-03-25 14:31:16 +0000 | |
|---|---|---|
| committer | 2026-03-25 14:31:16 +0000 | |
| commit | 48ff647cf4a8bb8f23fcd6b8616f56a8ef72b980 (patch) | |
| tree | ae199c38042adaa544d5f7d31351661d5831381e /ref/store/files/store.go | |
| parent | *: objectstore -> object/store (diff) | |
| signature | No signature | |
*: refstore -> ref/store
Diffstat (limited to 'ref/store/files/store.go')
| -rw-r--r-- | ref/store/files/store.go | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/ref/store/files/store.go b/ref/store/files/store.go new file mode 100644 index 00000000..e0cced65 --- /dev/null +++ b/ref/store/files/store.go @@ -0,0 +1,32 @@ +// Package files provides one Git files ref store with loose-over-packed reads +// and transaction-coordinated updates. +package files + +import ( + "math/rand" + "os" + "time" + + objectid "codeberg.org/lindenii/furgit/object/id" + "codeberg.org/lindenii/furgit/ref/store" +) + +// Store reads and writes one Git files ref namespace rooted at one repository +// gitdir plus its commondir. +// +// Store borrows gitRoot and owns commonRoot. Close releases only resources +// opened by the store itself. +type Store struct { + gitRoot *os.Root + commonRoot *os.Root + algo objectid.Algorithm + lockRand *rand.Rand + + packedRefsTimeout time.Duration +} + +var ( + _ refstore.ReadingStore = (*Store)(nil) + _ refstore.TransactionalStore = (*Store)(nil) + _ refstore.BatchStore = (*Store)(nil) +) |
