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
|
||||
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"
|
||||
|
|
|
@ -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"
|
||||
|
|
|
@ -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"
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -8,4 +8,4 @@ libexec="${localbase}"/libexec/sourcezap
|
|||
|
||||
##
|
||||
# main
|
||||
"${libexec}"/utils/gitexec diff -l0 ${@}
|
||||
"${libexec}"/utils/git diff -l0 ${@}
|
||||
|
|
Loading…
Reference in a new issue