aboutsummaryrefslogtreecommitdiff
path: root/internal
diff options
context:
space:
mode:
authorGravatar Runxi Yu2026-03-07 16:11:56 +0800
committerGravatar Runxi Yu2026-03-07 16:43:59 +0800
commit7867f699d66671b5a79a7962cfa5b651042c673e (patch)
treebe32a4911014306affc7a74b4ebb3b0cd4a3af0e /internal
parentmergebase: No fake iterator API first and idempotency (diff)
signatureNo signature
testgit: While I'm at it, add a tiny path escape hatch just for occasional use
Diffstat (limited to 'internal')
-rw-r--r--internal/testgit/repo_properties.go7
1 files changed, 7 insertions, 0 deletions
diff --git a/internal/testgit/repo_properties.go b/internal/testgit/repo_properties.go
index 703cef1c..e99281ec 100644
--- a/internal/testgit/repo_properties.go
+++ b/internal/testgit/repo_properties.go
@@ -11,3 +11,10 @@ func (testRepo *TestRepo) Algorithm() objectid.Algorithm {
func (testRepo *TestRepo) Env() []string {
return append([]string(nil), testRepo.env...)
}
+
+// DirButYouShouldReallyNotUseThisOkay returns the git dir of a repo.
+// Consider using a properly capability interface such as
+// os.Root instead; all uses of ambient path authority must be justified.
+func (testRepo *TestRepo) DirButYouShouldReallyNotUseThisOkay() string {
+ return testRepo.dir
+}