From 2581b50408418c698b35e946633f129f1e7d238d Mon Sep 17 00:00:00 2001 From: Neels Hofmeyr Date: Fri, 23 Jun 2017 04:07:40 +0200 Subject: jenkins-build-common.sh: cosmetic: clear repos a bit later If we rm -rf * and then checkout a branch, the log prints the entire file tree as deleted. Instead, rm just before the git reset --hard, which avoids the extra output. Change-Id: Ib5b28a82f05d941eae8f3a2f468ef1e9d67e6180 --- contrib/jenkins-build-common.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/contrib/jenkins-build-common.sh b/contrib/jenkins-build-common.sh index 63e0ba8..779f965 100644 --- a/contrib/jenkins-build-common.sh +++ b/contrib/jenkins-build-common.sh @@ -77,7 +77,6 @@ have_repo() { git clone "$git_url/$repo" "$repo" fi cd "$repo" - rm -rf * git fetch origin # Figure out whether we need to prepend origin/ to find branches in upstream @@ -87,6 +86,7 @@ have_repo() { git branch -D build_branch || true git checkout -b build_branch "$branch" + rm -rf * git reset --hard "$branch" git rev-parse HEAD -- cgit v1.2.3