aboutsummaryrefslogtreecommitdiff
path: root/refstore/files/root_for.go
diff options
context:
space:
mode:
authorGravatar Runxi Yu2026-03-07 18:09:20 +0800
committerGravatar Runxi Yu2026-03-07 18:17:54 +0800
commite667c3c52a535ee67fe895bb0240fbad6e920087 (patch)
tree0815f7cc9b2c4a06d00722bce4c3ac57c515288b /refstore/files/root_for.go
parentreceivepack: Connect protocol with service (diff)
signatureNo signature
refstore/files: Accept timeout instead of reading from config
And split things up again.
Diffstat (limited to 'refstore/files/root_for.go')
-rw-r--r--refstore/files/root_for.go13
1 files changed, 13 insertions, 0 deletions
diff --git a/refstore/files/root_for.go b/refstore/files/root_for.go
new file mode 100644
index 00000000..cb968ad9
--- /dev/null
+++ b/refstore/files/root_for.go
@@ -0,0 +1,13 @@
+package files
+
+import (
+ "os"
+)
+
+func (store *Store) rootFor(kind rootKind) *os.Root {
+ if kind == rootCommon {
+ return store.commonRoot
+ }
+
+ return store.gitRoot
+}