Skip to content

git: Fix warning on startup about Git binary fallback

Patrick Steinhardt requested to merge pks-git-command-factory-fix-warning into master

Gitaly supports different execution environments with bundled Git and distributed Git. If no such execution environment was properly set up though we will fall back to try and resolve Git via PATH as a last resort. Due to the way our environment constructors are arranged right now though the fallback will always be constructed, which ultimately leads to a warning that Git wasn't properly configured even though it in fact was.

Fix this issue by removing the fallback Git environment from our default constructors. Instead, we explicitly construct it only in the case where we didn't find any other available execution environment. Like this, we can now only print the warning when it actually applies.

Edited by Patrick Steinhardt

Merge request reports