]> git.pld-linux.org Git - packages/gitlab-runner.git/blob - branch-preserver.patch
up to 1.9.0-rc.4
[packages/gitlab-runner.git] / branch-preserver.patch
1 diff --git a/shells/abstract.go b/shells/abstract.go
2 index e4ae2b0..f3cb56b 100644
3 --- a/shells/abstract.go
4 +++ b/shells/abstract.go
5 @@ -99,7 +99,11 @@ func (b *AbstractShell) writeFetchCmd(w ShellWriter, build *common.Build, projec
6  
7  func (b *AbstractShell) writeCheckoutCmd(w ShellWriter, build *common.Build) {
8         w.Notice("Checking out %s as %s...", build.Sha[0:8], build.RefName)
9 -       w.Command("git", "checkout", "-f", "-q", build.Sha)
10 +       if build.Tag {
11 +               w.Command("git", "checkout", "-f", "-q", build.Sha)
12 +       } else {
13 +               w.Command("git", "checkout", "-fq", "-B", build.RefName, build.Sha)
14 +       }
15  }
16  
17  func (b *AbstractShell) cacheFile(build *common.Build, userKey string) (key, file string) {
This page took 0.086761 seconds and 3 git commands to generate.