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
1 changed files with 2 additions and 2 deletions

View File

@ -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