aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBernard Ogden <bernie.ogden@linaro.org>2015-02-17 15:03:15 +0000
committerBernard Ogden <bernie.ogden@linaro.org>2015-04-21 12:27:22 +0100
commita2540189a04d3463de296a431cd9f03b0f620d66 (patch)
tree40df0ccf4cf7148f101b4027c60831533db22174
parente1bc7a890c25c45d79f46c0a66ab244d77bd795e (diff)
Fix double-naming of branch in notice
Note that this line of code can only be reached if there is a non-master branch. We do not have to consider the master or revision cases in the notice. Change-Id: I29ad44885b8aaa011fef52d1dfb6cae359f02bf7
-rw-r--r--lib/checkout.sh2
-rwxr-xr-xtestsuite/test.sh12
2 files changed, 13 insertions, 1 deletions
diff --git a/lib/checkout.sh b/lib/checkout.sh
index 81beb2fb..cde40d4b 100644
--- a/lib/checkout.sh
+++ b/lib/checkout.sh
@@ -286,7 +286,7 @@ checkout()
# it doesn't exist already.
dryrun "(cd ${srcdir} && git checkout -B local_${revision})"
else
- notice "Checking out ${branch:+branch ${branch}}${branch-master branch} for ${tool} in ${srcdir}"
+ notice "Checking out branch ${branch} for ${tool} in ${srcdir}"
local cmd="${NEWWORKDIR} ${local_snapshots}/${repo} ${srcdir} ${branch}"
flock ${local_builds}/git$$.lock --command "${cmd}"
if test $? -gt 0; then
diff --git a/testsuite/test.sh b/testsuite/test.sh
index adb6dba7..5d6d2d33 100755
--- a/testsuite/test.sh
+++ b/testsuite/test.sh
@@ -1583,6 +1583,18 @@ else
untested "${testing}"
fi
+testing="checkout: http://git@<url>/<repo>.git~<branch> should pass with appropriate notice"
+if test ! -e "${PWD}/host.conf"; then
+ package="abe.git"
+ branch='staging'
+ revision=""
+ should="pass"
+ expected="^NOTE: Checking out branch staging for abe in .\\+~staging$"
+ test_checkout "${should}" "${testing}" "${package}" "${branch}" "${revision}" "${expected}"
+else
+ untested "${testing}"
+fi
+
echo "============= misc tests ================"
testing="pipefail"
out="`false | tee /dev/null`"