From 92166f64eec50b369300355df6081acca139ae82 Mon Sep 17 00:00:00 2001 From: sureshe456 <160699174+sureshe456@users.noreply.github.com> Date: Fri, 5 Sep 2025 21:05:12 +0530 Subject: [PATCH] [macOS]Pin Git to 2.50.1 version (#12954) * [macOS]Pin Git to 2.50.1 version * Update images/macos/scripts/build/install-git.sh Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --------- Co-authored-by: Suresh kumar Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- images/macos/scripts/build/install-git.sh | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/images/macos/scripts/build/install-git.sh b/images/macos/scripts/build/install-git.sh index adc3ecccf..4804802a7 100644 --- a/images/macos/scripts/build/install-git.sh +++ b/images/macos/scripts/build/install-git.sh @@ -7,7 +7,15 @@ source ~/utils/utils.sh echo "Installing Git..." -brew_smart_install "git" +#brew_smart_install "git" + +# pin Git to 2.50.1 due to problems in the latest Git version 2.51.0 +COMMIT=6b39030bc0d0a0a8df99afe37e5ae4d61ba07c88 +FORMULA_URL="https://raw.githubusercontent.com/Homebrew/homebrew-core/$COMMIT/Formula/g/git.rb" +FORMULA_PATH="$(brew --repository)/Library/Taps/homebrew/homebrew-core/Formula/g/git.rb" +mkdir -p "$(dirname $FORMULA_PATH)" +curl -fsSL $FORMULA_URL -o $FORMULA_PATH +HOMEBREW_NO_AUTO_UPDATE=1 HOMEBREW_NO_INSTALL_FROM_API=1 brew install git git config --global --add safe.directory "*"