Debian Codegraph @

debian/patches/test-fix-root-directory-resolution.patch

raw symbols SCIP
1 Descriptionscip-debian debian golang-github-percona-go-mysql 0.0~git20251202.b3e1c16-2 golang-github-percona-go-mysql/patches/`test-fix-root-directory-resolution.patch`#Description.: Use parent dir as root rather than searching for .git.
2 Authorscip-debian debian golang-github-percona-go-mysql 0.0~git20251202.b3e1c16-2 golang-github-percona-go-mysql/patches/`test-fix-root-directory-resolution.patch`#Author.: Lena Voytek <[email protected]scip-debian . . . identity/`[email protected]`.>
3 Forwardedscip-debian debian golang-github-percona-go-mysql 0.0~git20251202.b3e1c16-2 golang-github-percona-go-mysql/patches/`test-fix-root-directory-resolution.patch`#Forwarded.: not-needed
4 Last-Updatescip-debian debian golang-github-percona-go-mysql 0.0~git20251202.b3e1c16-2 golang-github-percona-go-mysql/patches/`test-fix-root-directory-resolution.patch`#Last-Update.: 2026-02-21
5 ---
6 This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
7 --- a/test/test.goscip-debian debian golang-github-percona-go-mysql 0.0~git20251202.b3e1c16-2 golang-github-percona-go-mysql/upstream/`test/test.go`:
8 +++ b/test/test.goscip-debian debian golang-github-percona-go-mysql 0.0~git20251202.b3e1c16-2 golang-github-percona-go-mysql/upstream/`test/test.go`:
9 @@ -35,24 +35,15 @@
10 "os"
11 "path/filepath"
12 "runtime"
13 + "strings"
14 )
15
16 var Update = flag.Bool("update", false, "update .golden files")
17
18 func RootDir() string {
19 _, filename, _, _ := runtime.Caller(1)
20 - dir := filepath.Dir(filename)
21 - if fileExists(dir + "/.git") {
22 - return filepath.Clean(dir)
23 - }
24 - dir += "/"
25 - for i := 0; i < 10; i++ {
26 - dir = dir + "../"
27 - if fileExists(dir + ".git") {
28 - return filepath.Clean(dir)
29 - }
30 - }
31 - panic("Cannot find .git/")
32 + dir := filepath.Dir(filename) + "/"
33 + return dir[:strings.Index(dir, "/go-mysql/")+len("/go-mysql/")]
34 }
35
36 func fileExists(file string) bool {