From 33b1b7588fad5d4f4f7c92440f5fcfdb09d3b187 Mon Sep 17 00:00:00 2001 From: Jo-Philipp Wich Date: Tue, 16 Jul 2019 19:14:08 +0200 Subject: [PATCH] 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 --- phase1/master.cfg | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 -- 2.30.2