Commit 5e4e3660 authored by Zeger-Jan van de Weg's avatar Zeger-Jan van de Weg

Wiki: #find_file defaults to HEAD over master

Gitaly will find Wiki files is requested to do so, and by default if no
revision is set, it will set the revision to `master`. Given the Git
community is moving towards `main` instead, this change sets the default
to HEAD.

This works as GitLab stores repositories in their bare format, and
effectively there's no HEAD. Git itself really likes there to be a HEAD,
and this thus points to the default branch name. Nowadays usually
`refs/heads/master`, in the future probably: `refs/heads/main`.
parent 41cf0b1f
......@@ -159,7 +159,7 @@ class Wiki
find_page(SIDEBAR, version)
end
def find_file(name, version = nil)
def find_file(name, version = 'HEAD')
wiki.file(name, version)
end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment