build: simplify git handling a bit, including terminology

This commit is contained in:
Franco Fichtner 2017-01-16 07:43:15 +01:00
parent 8b4efcc4d6
commit eedae02356
3 changed files with 5 additions and 8 deletions

View File

@ -246,7 +246,7 @@ if [ "${SELF}" != print -a "${SELF}" != info -a "${SELF}" != update ]; then
echo ">>> Running build step: ${SELF}"
fi
git_checkout()
git_reset()
{
git -C ${1} clean -xdqf .
REPO_TAG=${2}
@ -259,11 +259,8 @@ git_checkout()
git_update()
{
git -C ${1} fetch --all --prune
if [ -n "${2}" ]; then
git -C ${1} checkout ${2}
git -C ${1} pull
fi
git -C ${1} checkout ${2}
git -C ${1} pull
}
git_describe()

View File

@ -49,7 +49,7 @@ for CORE in ${CORE_LIST}; do
CORE_ARGS=
setup_copy ${STAGEDIR} ${COREDIR}
git_checkout ${STAGEDIR}${COREDIR} ${CORE}
git_reset ${STAGEDIR}${COREDIR} ${CORE}
git_describe ${STAGEDIR}${COREDIR} ${CORE}
if [ "${REPO_REFTYPE}" = tag -o -z "${REPO_BRANCH}" ]; then

View File

@ -47,7 +47,7 @@ done
git_branch ${PORTSDIR} ${PORTSBRANCH} PORTSBRANCH
git_update ${PORTSREFDIR} ${PORTSREFBRANCH}
git_checkout ${PORTSDIR} HEAD
git_reset ${PORTSDIR} HEAD
UNUSED=1
USED=1