Skip to content

tests: Catch invocations of dashed Git executables via PATH

Patrick Steinhardt requested to merge pks-tests-detect-dashed-git-via-path into master

As the administrator is expected to always specify the Git executable which is to be used via Gitaly's configuration file, we shouldn't ever use the PATH variable to resolve any Git command. We already verify whether that's the case for git, but don't yet do so for the important dashed executables like git-receive-pack, git-upload-pack and git-upload-archive. While we don't directly configure their location, Git should be able to figure it out and use them instead of any other one in PATH.

To verify we don't use them, this commit adds another set of wrapper scripts into our test binary directory. As we prepend this directory to PATH during make test, each execution via PATH would now be detected and raise an error.

Merge request reports