GitLab is showing inconsistent filename when accessing a file with the same contents with other file.
Summary
One of our customers reported the following:
If you open a file in a project, and the location if the files contains other files with the same content, the name of the files and name files in a path can be different.
They mentioned that this started to happen after they upgrade to GitLab 15.1. I was also able to reproduce this in GitLab.com.
The easiest way to explain this is via a screenshot. As you can see below:
I tried to access README-2.md
. It showed README-2.md
in the path, but the filename showed README-1.md
.
It doesn't happen all of the time though as it will fix itself after refreshing the page.
Steps to reproduce
- Create a repository.
- Commit multiple files with the same content.
- Try to access one of the files.
Example Project
https://gitlab.com/jdasmarinas/same-files
What is the current bug behavior?
Filename and file in the path is different.
What is the expected correct behavior?
Filename and file in the path is the same.
Relevant logs and/or screenshots
See screenshot above.
Output of checks
This bug happens on Gitlab.com
Results of GitLab environment info
Expand for output related to GitLab environment info
(For installations with omnibus-gitlab package run and paste the output of: `sudo gitlab-rake gitlab:env:info`) (For installations from source run and paste the output of: `sudo -u git -H bundle exec rake gitlab:env:info RAILS_ENV=production`)
Results of GitLab application Check
Expand for output related to the GitLab application check
(For installations with omnibus-gitlab package run and paste the output of:
sudo gitlab-rake gitlab:check SANITIZE=true
)(For installations from source run and paste the output of:
sudo -u git -H bundle exec rake gitlab:check RAILS_ENV=production SANITIZE=true
)(we will only investigate if the tests are passing)