aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobert Savoye <rob.savoye@linaro.org>2015-05-11 22:28:14 +0000
committerLinaro Code Review <review@review.linaro.org>2015-05-11 22:28:14 +0000
commit9f8bbdcc202517c5c2a8656bf6e2c0e5f58a4950 (patch)
treed000014c21447d8449b43e1337a8dbe20f8b6a9b
parented0ddb50216d8d24e6f265b11762def804f5135a (diff)
parent4c3c77b230000527f20039b2e76428d7f43e36c4 (diff)
Merge "Better parsing of srcdir into repodir"
-rw-r--r--lib/checkout.sh6
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/checkout.sh b/lib/checkout.sh
index b77d5bf4..4a20cc2d 100644
--- a/lib/checkout.sh
+++ b/lib/checkout.sh
@@ -249,8 +249,10 @@ checkout()
fi
;;
git*|http*|ssh*)
- #FIXME: This is an unreliable way to parse the repo directory.
- local repodir="`echo ${srcdir} | cut -d '~' -f 1 | cut -d '@' -f 1`"
+ #FIXME: We deliberately ignored error returns from get_git_url,
+ # because any path with an '@' in will result in errors.
+ # Jenkins is wont to create such paths.
+ local repodir="`get_git_url ssh://${srcdir} | sed 's#^ssh://##'`"
if test x"${revision}" != x"" -a x"${branch}" != x""; then
warning "You've specified both a branch \"${branch}\" and a commit \"${revision}\"."