From 7867f699d66671b5a79a7962cfa5b651042c673e Mon Sep 17 00:00:00 2001 From: Runxi Yu Date: Sat, 7 Mar 2026 16:11:56 +0800 Subject: testgit: While I'm at it, add a tiny path escape hatch just for occasional use --- internal/testgit/repo_properties.go | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'internal') 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 +} -- cgit v1.3.1-10-gc9f91