From: Jo-Philipp Wich Date: Tue, 14 Mar 2017 12:58:05 +0000 (+0100) Subject: phase1: fetch before checking out git branch X-Git-Tag: v1~173 X-Git-Url: http://git.openwrt.org/?p=buildbot.git;a=commitdiff_plain;h=eeab554e74b99a7c46f705b02d4b16ec1e2bd337 phase1: fetch before checking out git branch Signed-off-by: Jo-Philipp Wich --- diff --git a/phase1/master.cfg b/phase1/master.cfg index 992e01e..991039f 100644 --- a/phase1/master.cfg +++ b/phase1/master.cfg @@ -400,7 +400,7 @@ for target in targets: factory.addStep(ShellCommand( name = "switchbranch", description = "Checking out Git branch", - command = "if [ -d .git ]; then git checkout '%s'; else exit 0; fi" % repo_branch, + command = "if [ -d .git ]; then git fetch --depth=1 && git checkout '%s'; else exit 0; fi" % repo_branch, haltOnFailure = True, doStepIf = IsNoTaggingRequested ))