Skip to content

FindGit: Cache the version more effectively

In !5712 (merged), the GIT_VERSION_STRING was meant to be cached after the first time it was computed for a given GIT_EXECUTABLE location. That logic assumed GIT_VERSION_STRING would be visible in the current scope, but it might not be. The global property alone is enough to check whether the version has been determined previously, so don't switch the logic based on whether GIT_VERSION_STRING is defined or not.

Relates: #21703

Edited by Craig Scott

Merge request reports