Skip to content

Fix wiki repositories with wrong HEAD

What does this MR do?

Recently, we allowed wikis to use the instance default branch #221159 (closed). Nevertheless, there is a problem.

Before, when we created a project, the wiki repository was created as well, and HEAD was set to master.

Then, after the issue was implemented, if the repository root_ref was empty, we used the instance default branch to perform the pushes to, and here is where we have the problem, because HEAD was still pointing to master instead of the instance default branch.

In this MR, we're fixing that by changing the HEAD whenever we detect that there are no commits in the HEAD branch.

Does this MR meet the acceptance criteria?

Conformity

Related to #221159 (closed)

Merge request reports

Loading