#31 Get correct default branch
Merged by ralph. Opened by lsedlar.
lsedlar/pag get-default-branch  into  develop

Download 31.patch

The API does not provide this information, but we don't really need it.

In ideal word we could just do git ls-remote --symref GIT_URL HEAD and
get the information, but for some reason this does not currently work
with Pagure.

Default branch should be whatever HEAD points to in the remote repo, and
since we most likely work in a clone of it, the ref will exist locally
as well.

As an additional test case, this PR was submitted with pag pull-request -h lsedlar:get-default-branch using this patch.

Nice! :+1:

Pull-Request has been merged by ralph

Metadata