phase1: fetch before checking out git branch
[buildbot.git] / phase1 / master.cfg
index 992e01eef2924fa5651bc44c9bb9f313284c7ff7..991039ffc1b684ed350eb9cafbc8286fbbb7c65e 100644 (file)
@@ -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
        ))