Pin the version of git used in Darwin CI
Followup to #24055 (closed).
On Darwin, git
comes from the system and isn't pinned. Some versions of git seemed to have a bug that was the root cause of #24055 (closed). The bug was present in 2.40.1, but absent in 2.42.0.
Darwin CI should use a pinned, working version of git to prevent future surprises.