Skip to content

Fix a bug displaying project commit anchors

Nick Thomas requested to merge 329862-fix-project-path-generation into master

What does this MR do?

A repository can be non-empty, yet lack a root_ref. This may happen when non-standard git refs are pushed, for instance. When this is the case, we fail to generate a link to commits, resulting in a 500 error.

Using the "default" default branch in this case allows us to generate a link. It leads to a location that will 404, but that's a better outcome than the current scenario, and consistent with other links in this helper.

Does this MR meet the acceptance criteria?

Conformity

Availability and Testing

Related to #329862 (closed)

Edited by Nick Thomas

Merge request reports