BUG empty file with name %20

Summary

Adding a file whose name is a single space character (" ") directly under a repository’s root directory causes several UI problems:

  • The file’s commit history is not shown; instead the repository’s overall history is displayed.

Steps to reproduce

prepare the file

  1. create a new file at the root of a repository with the name " " (1 space) by using "+" menu and "new file" buttons.
  2. commit it.

file history

  1. select it in file view and push history button to show the file history.
  2. you'll see repository history, not the file's history

Example Project

https://gitlab.com/gitlab-org/gitlab/-/blob/master/%20?ref_type=heads

What is the current bug behavior?

  1. we can see the repository history.

What is the expected correct behavior?

  1. we can see the file history.

Relevant logs and/or screenshots

  1. repository history, not file history スクリーンショット_2025-12-22_23.06.11

Output of checks

Results of GitLab environment info

Results of GitLab application Check

Possible fixes

Patch release information for backports

High-severity bug remediation

Edited by 🤖 GitLab Bot 🤖