From 2380f8cb1acb8027987d6e78e6a79768730fe622 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C4=90o=C3=A0n=20Tr=E1=BA=A7n=20C=C3=B4ng=20Danh?= Date: Thu, 21 Oct 2021 08:31:05 +0700 Subject: [PATCH] changed_templates: use $GIT_CMD instead of git everywhere --- common/travis/changed_templates.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/common/travis/changed_templates.sh b/common/travis/changed_templates.sh index 8c5d8a880a6..686436ce432 100755 --- a/common/travis/changed_templates.sh +++ b/common/travis/changed_templates.sh @@ -8,13 +8,13 @@ elif command -v git >/dev/null 2>&1; then GIT_CMD=$(command -v git) fi -tip="$(git rev-list -1 --parents HEAD)" +tip="$($GIT_CMD rev-list -1 --parents HEAD)" case "$tip" in *" "*" "*) tip="${tip##* }" ;; *) tip="${tip%% *}" ;; esac -base="$(git merge-base FETCH_HEAD "$tip")" || { +base="$($GIT_CMD merge-base FETCH_HEAD "$tip")" || { echo "Your branches is based on too old copy." echo "Please rebase to newest copy." exit 1