]> git.pld-linux.org Git - packages/gitlab-runner.git/blame - branch-preserver.patch
up to 12.4.1
[packages/gitlab-runner.git] / branch-preserver.patch
CommitLineData
2cb3b302
ER
1--- gitlab-runner/shells/abstract.go~ 2019-10-28 14:11:26.000000000 +0200
2+++ gitlab-runner/shells/abstract.go 2019-11-10 02:47:02.568781451 +0200
3@@ -337,7 +337,11 @@
c4affa20
ER
4
5 func (b *AbstractShell) writeCheckoutCmd(w ShellWriter, build *common.Build) {
ec1f413c
ER
6 w.Notice("Checking out %s as %s...", build.GitInfo.Sha[0:8], build.GitInfo.Ref)
7- w.Command("git", "checkout", "-f", "-q", build.GitInfo.Sha)
8+ if build.GitInfo.RefType == common.RefTypeTag {
9+ w.Command("git", "checkout", "-f", "-q", build.GitInfo.Sha)
dfe9a179 10+ } else {
ec1f413c 11+ w.Command("git", "checkout", "-fq", "-B", build.GitInfo.Ref, build.GitInfo.Sha)
dfe9a179 12+ }
c4affa20 13
2cb3b302
ER
14 cleanFlags := build.GetGitCleanFlags()
15 if len(cleanFlags) > 0 {
This page took 0.022025 seconds and 4 git commands to generate.