Replace sourcezap/utils/gitexec with sourcezap/utils/git
Some checks are pending
sourcezap / shellcheck (push) Waiting to run
Some checks are pending
sourcezap / shellcheck (push) Waiting to run
This commit is contained in:
parent
1c344e0c60
commit
aaecf00394
6 changed files with 17 additions and 18 deletions
|
@ -10,9 +10,9 @@ branch=$2
|
||||||
|
|
||||||
##
|
##
|
||||||
# functions
|
# functions
|
||||||
gitexec()
|
git()
|
||||||
{
|
{
|
||||||
"${libexec}"/utils/gitexec "${1}"
|
"${libexec}"/utils/git "${@}"
|
||||||
}
|
}
|
||||||
|
|
||||||
printok()
|
printok()
|
||||||
|
@ -44,8 +44,7 @@ fi
|
||||||
|
|
||||||
set -x
|
set -x
|
||||||
cd "${gitdir}"
|
cd "${gitdir}"
|
||||||
gitexec "fetch origin"
|
git fetch origin
|
||||||
gitexec "checkout ${branch}" ||
|
git checkout "${branch}" || git checkout -t origin/"${branch}"
|
||||||
gitexec "checkout -t origin/${branch}"
|
|
||||||
set +x
|
set +x
|
||||||
printok "${branch} checked out"
|
printok "${branch} checked out"
|
||||||
|
|
|
@ -11,9 +11,9 @@ branch=$3
|
||||||
|
|
||||||
##
|
##
|
||||||
# functions
|
# functions
|
||||||
gitexec()
|
git()
|
||||||
{
|
{
|
||||||
"${libexec}"/utils/gitexec "${1}"
|
"${libexec}"/utils/git "${@}"
|
||||||
}
|
}
|
||||||
|
|
||||||
printok()
|
printok()
|
||||||
|
@ -44,9 +44,9 @@ if [ -e "${gitdir}/.git" ]; then
|
||||||
fi
|
fi
|
||||||
|
|
||||||
set -x
|
set -x
|
||||||
gitexec "clone ${giturl} ${gitdir}"
|
git clone "${giturl}" "${gitdir}"
|
||||||
cd "${gitdir}"
|
cd "${gitdir}"
|
||||||
gitexec "config core.filemode off"
|
git config core.filemode off
|
||||||
gitexec "checkout -t origin/${branch}"
|
git checkout -t origin/"${branch}"
|
||||||
set +x
|
set +x
|
||||||
printok "clone complete"
|
printok "clone complete"
|
||||||
|
|
|
@ -9,9 +9,9 @@ gitdir=$1
|
||||||
|
|
||||||
##
|
##
|
||||||
# functions
|
# functions
|
||||||
gitexec()
|
git()
|
||||||
{
|
{
|
||||||
"${libexec}"/utils/gitexec "${1}"
|
"${libexec}"/utils/git "${@}"
|
||||||
}
|
}
|
||||||
|
|
||||||
printok()
|
printok()
|
||||||
|
@ -44,7 +44,7 @@ fi
|
||||||
|
|
||||||
set -x
|
set -x
|
||||||
cd "${gitdir}"
|
cd "${gitdir}"
|
||||||
branch=$(gitexec "branch --show-current")
|
branch=$(git "branch --show-current")
|
||||||
gitexec "pull --rebase origin ${branch}"
|
git pull --rebase origin "${branch}"
|
||||||
set +x
|
set +x
|
||||||
printok "pull complete"
|
printok "pull complete"
|
||||||
|
|
|
@ -9,12 +9,12 @@ gitdir=$1
|
||||||
|
|
||||||
##
|
##
|
||||||
# functions
|
# functions
|
||||||
gitexec()
|
git()
|
||||||
{
|
{
|
||||||
"${libexec}"/utils/gitexec "${1}"
|
"${libexec}"/utils/git "${1}"
|
||||||
}
|
}
|
||||||
|
|
||||||
##
|
##
|
||||||
# main
|
# main
|
||||||
cd "${gitdir}"
|
cd "${gitdir}"
|
||||||
gitexec "rev-parse HEAD"
|
git rev-parse HEAD
|
||||||
|
|
|
@ -8,4 +8,4 @@ libexec="${localbase}"/libexec/sourcezap
|
||||||
|
|
||||||
##
|
##
|
||||||
# main
|
# main
|
||||||
"${libexec}"/utils/gitexec diff -l0 ${@}
|
"${libexec}"/utils/git diff -l0 ${@}
|
||||||
|
|
Loading…
Reference in a new issue