Draft: Ensure the default branch is always set 2
What does this MR do and why?
One of the complications to retrieving the default branch from gitaly is that gitaly uses a heuristic instead of solely relying on the repository HEAD. This heuristic will return nothing on empty repositories.
Gitaly are looking to remove this heuristic and simplify the code such that it always returns HEAD. Doing this means that the RPC FindDefaultBranchName will always return a branch name.
Here we are trying to minimise the differences between these two implementations by ensuring HEAD is set correctly even on empty repositories.
Screenshots or screen recordings
Screenshots are required for UI changes, and strongly recommended for all other merge requests.
How to set up and validate locally
Numbered steps to set up and validate the change are strongly suggested.
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this MR.