clone.sh: Don't print mouthful "You are in 'detached HEAD' state" message
Also, cut down on number of empty lines printed. All this is to not take so
much space in the build log, as cloning is usually not the most interesting
part of it.
Signed-off-by: Paul Sokolovsky <paul.sokolovsky@linaro.org>
Change-Id: I35f47ac9af0b0fe20475f21f00f934eb7a9daa69
diff --git a/clone.sh b/clone.sh
index 11279e2..333a4db 100755
--- a/clone.sh
+++ b/clone.sh
@@ -94,7 +94,11 @@
SHARE_FOLDER=${SHARE_VOLUME}/${JOB_NAME}/${BUILD_NUMBER}
fi
-echo "Share Folder ${SHARE_FOLDER}"
+echo "Share Folder path: ${SHARE_FOLDER}"
+echo
+
+# Don't print mouthfull "You are in 'detached HEAD' state." messages.
+git config --global advice.detachedHead false
# clone git repos
for repo in ${repos[@]}; do
@@ -118,13 +122,13 @@
git fetch ${REPO_URL} ${REPO_REFSPEC}
git checkout FETCH_HEAD
- echo -e "\n\nShare Folder ${SHARE_FOLDER}/${REPO_NAME} $(git rev-parse --short HEAD)\n\n"
+ echo -e "Share Folder ${SHARE_FOLDER}/${REPO_NAME} $(git rev-parse --short HEAD)\n"
cd $OLDPWD
else
# otherwise just show the head's log
cd ${SHARE_FOLDER}/${REPO_NAME}
- echo -e "\n\nShare Folder ${SHARE_FOLDER}/${REPO_NAME} $(git rev-parse --short HEAD)\n\n"
+ echo -e "Share Folder ${SHARE_FOLDER}/${REPO_NAME} $(git rev-parse --short HEAD)\n"
cd $OLDPWD
fi