Skip to content

Fix default branch throwing error instead of null

Warren Gifford requested to merge es/fix-default-branch-erroring into main

Created by: eseliger

When getDefaultBranchForRepo discovers a repo is empty or still cloning, it returns "", nil. The resolver didn't properly account for that though and returned a GitRefResolver even if the refName is empty. That led to a ref resolver that tried to read the repo at repoName@ which is an invalid refspec and causes an error to be thrown. This fixes it.

Merge request reports

Loading