"error: cannot lock ref" when two branches that only differ in case

Summary

When pushing a branch with the same name as another, but different case, a third branch had a job that failed. The job worked as expected after retrying the job.

Branches:

  • branch_a
  • branch_b
  • branch_B

This is most probably because windows folders doesn't differ between cases.

Relevant logs and/or screenshots

Running with gitlab-runner 12.2.0 (a987417a)
  on buildserver-uncontained-powershell xxxxxxxx
Using Shell executor...
Running on server...
Fetching changes...
Reinitialized existing Git repository in C:/gitlab-runner/builds/9CaDD9ZL/0/grouppath/reponame/.git/
From http://example.com/grouppath/reponame
 * [new branch]        branch_B      -> origin/branch_B
error: cannot lock ref 'refs/remotes/origin/drone': is at e7cab0dd701ca89f280d653de16ac61f0ff21bb4 but expected 522ac3257681d758569ff7ada3244c37b513db3a
 ! 522ac325..7b35b3bc  branch_b      -> origin/branch_b  (unable to update local ref)
 + ad0819c9...3115cc8e branch_A -> origin/branch_A  (forced update)
ERROR: Job failed: exit status 1

Environment description

  • GitLab core self hosted on Windows Server 2019
  • powershell executor

Used GitLab Runner version

GitLab runner 12.2.0