Skip to content
Snippets Groups Projects
Commit 41582380 authored by Georges Racinet's avatar Georges Racinet
Browse files

RefService.FindDefaultBranchName: filter out non existing target

It turns out that Gitaly returns an empty response on an empty
repository, whatever the value stored as default branch might be.
In case the default branch points to a branch that does not exist,
it returns the first branch it can find. This latter case cannot
happen with the state maintainer provided by py-heptapod.

This can be important for various mechanisms to actually set the
default branch. We're simply returning an empty response if the
default branch is set but its target does not exist. This amounts
to the same in all current scenarios. Later on we could return the
first GitLab branch if that becomes useful.
parent a08d999d
No related branches found
No related tags found
Loading
Checking pipeline status
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment