Antora does not find heads in local bare repository if at least one remote branch is mapped
If a bare repository maps remote branches, such as PR branches, then Antora will not find any head (primary) branches. According to the git documentation, when cloning a repository using --bare:
the branch heads at the remote are copied directly to corresponding local branch heads, without mapping them to refs/remotes/origin/.
Under normal circumstances, this works find in Antora. Antora looks for local branches if it does not find any remote branches. However, if at least one remote branch is found, then it will not consider local branches. This situation can happen if the user has configured git to map PRs as remote branches:
[remote "origin"]
fetch = +refs/pull/*/head:refs/remotes/origin/pr/*
Antora should recognize that it's working with a non-managed bare repository and consult local branches even if it finds at least one remote branch mapped. The local branches should be preferred.