@@ -79,12 +79,12 @@ checkout()
dryrun "(cd ${srcdir} && git pull origin ${branch})"
else
if test x"${branch}" = x; then
- # Strip off the "/<branchname>" from $1 to get the repo address
- local repo="`echo $1 | sed -e "s:\(^.*/${tool}.git\).*:\1:"`"
- dryrun "git clone ${repo} ${local_snapshots}/${tool}.git"
+ dryrun "git clone $1 ${srcdir}"
else
if test ! -d ${local_snapshots}/${tool}.git; then
- dryrun "git clone $1 ${srcdir}"
+ # Strip off the "/<branchname>" from $1 to get the repo address
+ local repo="`echo $1 | sed -e "s:\(^.*/${tool}.git\).*:\1:"`"
+ dryrun "git clone ${repo} ${local_snapshots}/${tool}.git"
fi
dryrun "git-new-workdir ${local_snapshots}/${tool}.git ${srcdir} ${branch}"
fi
From: "Ryan S. Arnold" <ryan.arnold@linaro.org> For some reason the merge for patch "[PATCH] Fix git clone to get repo without branch name as part of the url" merged the change into the wrong spot. This patch fixes it and puts it on the correct 'if' leg. I tested with a build. Ryan S. Arnold --- lib/checkout.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)