Prefer direct git installation for Windows

Bug: b/360206460
Change-Id: I7068b201b0b976ac619db16ff16d5ffbe5aea362
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/5884196
Reviewed-by: Allen Li <ayatane@chromium.org>
Reviewed-by: Josip Sokcevic <sokcevic@chromium.org>
Commit-Queue: Anne Redulla <aredulla@google.com>
This commit is contained in:
Anne Redulla
2024-11-13 03:10:47 +00:00
committed by LUCI CQ
parent d688d75f4f
commit 25f9761514
9 changed files with 175 additions and 33 deletions

View File

@@ -5,8 +5,13 @@ UNIX_BASE=`cygpath "$WIN_BASE"`
export PATH="$PATH:$UNIX_BASE/${PYTHON3_BIN_RELDIR_UNIX}:$UNIX_BASE/${PYTHON3_BIN_RELDIR_UNIX}/Scripts"
export PYTHON_DIRECT=1
export PYTHONUNBUFFERED=1
WIN_GIT_PARENT=`dirname "${GIT_BIN_ABSDIR}"`
UNIX_GIT_PARENT=`cygpath "$WIN_GIT_PARENT"`
BASE_GIT=`basename "${GIT_BIN_ABSDIR}"`
UNIX_GIT="$UNIX_GIT_PARENT/$BASE_GIT"
if [[ $# > 0 ]]; then
$UNIX_BASE/${GIT_BIN_RELDIR_UNIX}/bin/bash.exe "$@"
"$UNIX_GIT/bin/bash.exe" "$@"
else
$UNIX_BASE/${GIT_BIN_RELDIR_UNIX}/git-bash.exe &
"$UNIX_GIT/git-bash.exe" &
fi