After we upgraded the Git plugin to 4.4.1 we started noticing issues with some of our projects picking incorrect Git binary path that causes build failure during the checkout stage. We have to check the "Disable performance enhancements" checkbox to get our builds working again. I do believe this is a bug as our usage has nothing to do with JGit.
First a quick background on our build env. Our build env consists of a single Jenkins Server running on Windows Server as well as several Windows and Mac jenkins nodes.
With this setup what we have been doing is set the "Default Git" git tool to 'C:\Program Files\Git\bin\git.exe on Jenkins Server, and we override this on the Mac build nodes with Default Git -> /usr/local/bin/git.
Prior of Git plugin version 4.4.1 this works perfectly. Windows nodes would use Default Git -> C:\Program Files\Git\bin\git.exe, and Mac nodes would use /usr/local/bin/git
After upgrading Git plugin to version 4.4.1. We noticed that some of our projects with big git repo would choose the Windows
based path even though they are on the Mac node. We can see the following msg in the build log
And of course this will never work on the Mac node
No matter what we do the build will always default back to this windows path, this is even after we tried set a secondary git tool name and set the node and checkout call to use it, they get discarded and will keep coming back to this server git path.
Currently we get around the problem by enabling "Disable Performance Enhancements". This is after going thru the changes in GitHub to figure the problem out. I don't think this feature was intended to fix our specific use case.