Skip to content

web: support repos without default branch

Warren Gifford requested to merge tj/phabricator-not-found into main

Created by: tjkandala

Fix #9651 (closed).

We previously assumed that a repository must have a default branch. However, Phabricator staging areas do not require a default branch, which breaks "Go to definition" and "Find references" functionality for the Phabricator native integration/browser extension.

Fix: Don't throw RevisionNotFoundError when no default branch is found, rather only when no Git tree is found. Fallback to 'HEAD' when default branch isn't found. I believe this isn't risky since we already do this throughout the web app

Before

Screenshot from 2021-03-17 14-33-07

After

Screenshot from 2021-03-17 14-51-46

Screenshot from 2021-03-17 14-36-27

Merge request reports

Loading