Skip to content

Fix for discover_default_branch

When more than 1 branch exists and neither are master and the HEAD has not been updated to one of the existing branches, discover_default_branch would return master.

This checks that HEAD exists before returning it.

This has been reported https://gitlab.com/gitlab-org/gitlab-ce/issues/108.

Merge request reports