changed_templates: use $GIT_CMD instead of git everywhere

This commit is contained in:
Đoàn Trần Công Danh 2021-10-21 08:31:05 +07:00 committed by Đoàn Trần Công Danh
parent b739f8c23a
commit 2380f8cb1a

View file

@ -8,13 +8,13 @@ elif command -v git >/dev/null 2>&1; then
GIT_CMD=$(command -v git) GIT_CMD=$(command -v git)
fi fi
tip="$(git rev-list -1 --parents HEAD)" tip="$($GIT_CMD rev-list -1 --parents HEAD)"
case "$tip" in case "$tip" in
*" "*" "*) tip="${tip##* }" ;; *" "*" "*) tip="${tip##* }" ;;
*) tip="${tip%% *}" ;; *) tip="${tip%% *}" ;;
esac 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 "Your branches is based on too old copy."
echo "Please rebase to newest copy." echo "Please rebase to newest copy."
exit 1 exit 1