fetch: fix check for local ref path
This is a fast case if the slave has a local checkout available so that it doesn't have to do a full clone. The check unfortunately didn't take into account all cases and failed on the new slave.
This commit is contained in:
+4
-4
@@ -40,11 +40,11 @@ update_repo() {
|
|||||||
git fetch origin || die "unable to fetch ${uri}"
|
git fetch origin || die "unable to fetch ${uri}"
|
||||||
else
|
else
|
||||||
echo "Cloning '${path}'"
|
echo "Cloning '${path}'"
|
||||||
if [ -z "${GIT_LOCAL_REF_DIR}" ]; then
|
if [ -d "${GIT_LOCAL_REF_DIR}" ]; then
|
||||||
git clone ${uri} ${path} || die "unable to clone ${uri}"
|
|
||||||
else
|
|
||||||
git clone --reference ${GIT_LOCAL_REF_DIR}/`basename ${path}` \
|
git clone --reference ${GIT_LOCAL_REF_DIR}/`basename ${path}` \
|
||||||
${uri} ${path} || die "unable to clone ${uri}"
|
${uri} ${path} || die "unable to clone ${uri}"
|
||||||
|
else
|
||||||
|
git clone ${uri} ${path} || die "unable to clone ${uri}"
|
||||||
fi
|
fi
|
||||||
pushd ${path} > /dev/null
|
pushd ${path} > /dev/null
|
||||||
fi
|
fi
|
||||||
|
|||||||
Reference in New Issue
Block a user