diff --git a/libexec/sourcezap/commands/sourcezap-checkout b/libexec/sourcezap/commands/sourcezap-checkout index 6cc6117..39db0f6 100755 --- a/libexec/sourcezap/commands/sourcezap-checkout +++ b/libexec/sourcezap/commands/sourcezap-checkout @@ -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" diff --git a/libexec/sourcezap/commands/sourcezap-clone b/libexec/sourcezap/commands/sourcezap-clone index e632597..ac68c78 100755 --- a/libexec/sourcezap/commands/sourcezap-clone +++ b/libexec/sourcezap/commands/sourcezap-clone @@ -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" diff --git a/libexec/sourcezap/commands/sourcezap-pull b/libexec/sourcezap/commands/sourcezap-pull index 2f2e5f6..6777f3c 100755 --- a/libexec/sourcezap/commands/sourcezap-pull +++ b/libexec/sourcezap/commands/sourcezap-pull @@ -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" diff --git a/libexec/sourcezap/utils/gitexec b/libexec/sourcezap/utils/git similarity index 100% rename from libexec/sourcezap/utils/gitexec rename to libexec/sourcezap/utils/git diff --git a/libexec/sourcezap/utils/git-rev b/libexec/sourcezap/utils/git-rev index d025ecf..db476b1 100755 --- a/libexec/sourcezap/utils/git-rev +++ b/libexec/sourcezap/utils/git-rev @@ -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 diff --git a/libexec/sourcezap/utils/gitdiff b/libexec/sourcezap/utils/gitdiff index 52a3ee4..b1f0b7b 100755 --- a/libexec/sourcezap/utils/gitdiff +++ b/libexec/sourcezap/utils/gitdiff @@ -8,4 +8,4 @@ libexec="${localbase}"/libexec/sourcezap ## # main -"${libexec}"/utils/gitexec diff -l0 ${@} +"${libexec}"/utils/git diff -l0 ${@}