Commit b07bb937 authored by Tobias Schmidt's avatar Tobias Schmidt

Handle repository changes more helpful in checkout

parent 089d3825
......@@ -52,4 +52,8 @@ git init
git config core.sparsecheckout true
echo "${DIRECTORY}" > .git/info/sparse-checkout
git pull --depth=1 "${REPOSITORY}" "${REFSPEC}"
if ! git remote | grep -q origin; then
git remote add origin "${REPOSITORY}"
fi
git fetch --depth=1 origin "${REFSPEC}"
git reset --hard origin/"${REFSPEC}"
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment