sourcegraph / zoekt

Fast trigram based code search
Apache License 2.0
736 stars 83 forks source link

gitindex: include environ for git tests #760

Closed keegancsmith closed 6 months ago

keegancsmith commented 7 months ago

A recent change introduced GIT_CONFIG_GLOBAL and GIT_CONFIG_SYSTEM, but ran into the footgun of unsetting the rest of the environ when cmd.Env is non-empty. This for example broke tests for me since we didn't have my custom $PATH set.

Instead we revert the change and make a much smaller change to just always set the relevant environment variables.

Test Plan: go test