Skip to content

Retrieve ref from unborn HEAD for wikis

Related to gitlab#221159 (closed).

The Gollum wiki defaults the commit operation to master. This means that we cannot change the commit operation unless we add the ref option when we initialise the Gollum wiki object.

The problem is that with the first commit, we create the rev in refs/heads/. At this point the repository is empty and, in order to get which rev to write to, we need to check the symbolic ref inside HEAD.

In this MR we pass the ref to the Gollum wiki object depending on, whether the root_ref exists (the repo is not empty) or the symbolic ref (the repo is empty).

Merge request reports