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 <jo@mein.io>
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