]> git.pld-linux.org Git - packages/gitlab-runner.git/blob - branch-preserver.patch
Up to 13.12.0
[packages/gitlab-runner.git] / branch-preserver.patch
1 --- gitlab-runner-13.12.0/src/gitlab.com/gitlab-org/gitlab-runner/shells/abstract.go~   2021-05-20 18:01:08.000000000 +0300
2 +++ gitlab-runner-13.12.0/src/gitlab.com/gitlab-org/gitlab-runner/shells/abstract.go    2021-09-06 17:21:01.502430880 +0300
3 @@ -386,7 +386,11 @@
4  
5  func (b *AbstractShell) writeCheckoutCmd(w ShellWriter, build *common.Build) {
6         w.Noticef("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)
10 +       } else {
11 +               w.Command("git", "checkout", "-fq", "-B", build.GitInfo.Ref, build.GitInfo.Sha)
12 +       }
13  
14         cleanFlags := build.GetGitCleanFlags()
15         if len(cleanFlags) > 0 {
This page took 0.086917 seconds and 3 git commands to generate.