Skip to content

Feature #33533, redirect to root when path does not exist on branch

What does this MR do?

If viewing the blob or blame of a file, users are redirected to an unhelpful 404 page if they try to switch to a branch where their current path does not exist.

With this feature change, users would be redirected to the root of the repository and provided a notification.

After a recent change, this is the current behavior when viewing a file's history (but without the notification). This change would create a more consistent user experience across the history, blame, blob, and tree views.

Screenshots

The following screen captures illustrate what the new behavior would look like for each particular view.

Blobs

before after
blob_before blob_after

Blame

before after
blame_before blame_after

Tree

before after
tree_before tree_after

History

current behavior
history_current

Does this MR meet the acceptance criteria?

Conformity

This is still a WIP.

Testing

Closes #33533 (closed)

Edited by Jesse Hall

Merge request reports