Incorrect commit messages and timestamps are shown on files with the same filename
Summary
If a project is structured like the below, and each subfolder has files with similar names, the file listings might display the wrong commit message and timestamp in the GitLab UI.
├─ alpha/
│ ├─ .develop-deploy.yml
│ ├─ .production-deploy.yml
│ ├─ .setup-deploy.yml
│ ├─ .test-deploy.yml
│ ├─ alpha
├─ beta/
│ ├─ .develop-deploy.yml
│ ├─ .production-deploy.yml
│ ├─ .setup-deploy.yml
│ ├─ .test-deploy.yml
│ ├─ beta
Steps to reproduce
- Create the folder structure above:
- In the first commit, add the
alpha
folder and it's contents, and set the commit message to "alpha". - In the first commit, add the
beta
folder and it's contents, and set the commit message to "beta".
- In the first commit, add the
- Open the "beta" folder and observe that all the files in this folder have the "beta" commit message and timestamps.
- Using the breadcrumbs, navigate to the parent folder and then click into the "alpha" folder.
- At this point, the files in the "alpha" folder will show "beta" as the commit message along with the beta timestamps, with the exception of the "alpha" file.
- If you then refresh the page, the "alpha" files will then show the correct "alpha" commit message and timestamps.
See the video for a run through of the bug:
Example Project
https://gitlab.com/anton-bugs/292414
What is the current bug behavior?
When files have similar filenames between different subfolders, the incorrect commit message and timestamp is sometimes shown.
What is the expected correct behavior?
When files have similar filenames between different subfolders, the correct commit message and timestamp should be always shown.
Relevant logs and/or screenshots
Possible fixes
This bug seems to be caused by the :lazy_load_commits
feature that is enabled on GitLab.com #342497 (closed)
This feature is disabled by default on self managed, where the problem cannot be reproduced until you enable the :lazy_load_commits
feature.
Would be nice to add to test file with slash in it: repo/file