fork of https://github.com/sourcegraph/zoekt
0

Configure Feed

Select the types of activity you want to include in your feed.

gitindex: set protocol.file.allow just in test (#568)

This makes it so you can run submodule tests without first adjusting
your global environment to allow file clones. This was a somewhat recent
change in git to require opting in. Previously we would just set the
config in CI, but now we just always do it _just_ for that test run.

Test Plan: go test and CI

+7 -4
-3
.github/workflows/ci.yml
··· 15 15 run: apk add go git 16 16 - name: install ctags 17 17 run: ./install-ctags-alpine.sh 18 - # Needed for submodule tests in gitindex 19 - - name: git protocol.file.allow 20 - run: git config --global --replace-all protocol.file.allow always 21 18 - name: test 22 19 run: go test ./... 23 20
+7 -1
gitindex/tree_test.go
··· 40 40 if err := os.MkdirAll(dir, 0o755); err != nil { 41 41 return err 42 42 } 43 - script := `mkdir adir bdir 43 + script := ` 44 + # Fix fatal: transport 'file' not allowed 45 + export GIT_CONFIG_COUNT=1 46 + export GIT_CONFIG_KEY_0=protocol.file.allow 47 + export GIT_CONFIG_VALUE_0=always 48 + 49 + mkdir adir bdir 44 50 cd adir 45 51 git init -b master 46 52 mkdir subdir