From: Jo-Philipp Wich Date: Tue, 16 Jul 2019 17:14:08 +0000 (+0200) Subject: phase1: forcibly checkout branch X-Git-Tag: v1~81 X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=33b1b7588fad5d4f4f7c92440f5fcfdb09d3b187;p=buildbot.git phase1: forcibly checkout branch Pass the -f flag to git checkout in order to ensure that any potentially existing local changes are overwritten. Signed-off-by: Jo-Philipp Wich --- diff --git a/phase1/master.cfg b/phase1/master.cfg index ff2f3e2..cd951e0 100644 --- a/phase1/master.cfg +++ b/phase1/master.cfg @@ -579,7 +579,7 @@ for target in targets: factory.addStep(ShellCommand( name = "gitcheckout", description = "Ensure that Git HEAD is sane", - command = "if [ -d .git ]; then git checkout %s; git branch --set-upstream-to origin/%s; else exit 0; fi" %(repo_branch, repo_branch), + command = "if [ -d .git ]; then git checkout -f %s; git branch --set-upstream-to origin/%s; else exit 0; fi" %(repo_branch, repo_branch), haltOnFailure = True)) # check out the source