Replace sourcezap/utils/gitexec with sourcezap/utils/git
Some checks are pending
sourcezap / shellcheck (push) Waiting to run

This commit is contained in:
0x1eef 2024-07-02 09:11:06 -03:00
parent 1c344e0c60
commit aaecf00394
6 changed files with 17 additions and 18 deletions

View file

@ -10,9 +10,9 @@ branch=$2
##
# functions
gitexec()
git()
{
"${libexec}"/utils/gitexec "${1}"
"${libexec}"/utils/git "${@}"
}
printok()
@ -44,8 +44,7 @@ fi
set -x
cd "${gitdir}"
gitexec "fetch origin"
gitexec "checkout ${branch}" ||
gitexec "checkout -t origin/${branch}"
git fetch origin
git checkout "${branch}" || git checkout -t origin/"${branch}"
set +x
printok "${branch} checked out"

View file

@ -11,9 +11,9 @@ branch=$3
##
# functions
gitexec()
git()
{
"${libexec}"/utils/gitexec "${1}"
"${libexec}"/utils/git "${@}"
}
printok()
@ -44,9 +44,9 @@ if [ -e "${gitdir}/.git" ]; then
fi
set -x
gitexec "clone ${giturl} ${gitdir}"
git clone "${giturl}" "${gitdir}"
cd "${gitdir}"
gitexec "config core.filemode off"
gitexec "checkout -t origin/${branch}"
git config core.filemode off
git checkout -t origin/"${branch}"
set +x
printok "clone complete"

View file

@ -9,9 +9,9 @@ gitdir=$1
##
# functions
gitexec()
git()
{
"${libexec}"/utils/gitexec "${1}"
"${libexec}"/utils/git "${@}"
}
printok()
@ -44,7 +44,7 @@ fi
set -x
cd "${gitdir}"
branch=$(gitexec "branch --show-current")
gitexec "pull --rebase origin ${branch}"
branch=$(git "branch --show-current")
git pull --rebase origin "${branch}"
set +x
printok "pull complete"

View file

@ -9,12 +9,12 @@ gitdir=$1
##
# functions
gitexec()
git()
{
"${libexec}"/utils/gitexec "${1}"
"${libexec}"/utils/git "${1}"
}
##
# main
cd "${gitdir}"
gitexec "rev-parse HEAD"
git rev-parse HEAD

View file

@ -8,4 +8,4 @@ libexec="${localbase}"/libexec/sourcezap
##
# main
"${libexec}"/utils/gitexec diff -l0 ${@}
"${libexec}"/utils/git diff -l0 ${@}