Creating a file with the name of an existing directory succeeds with empty commit
Summary
When creating a new file where a directory of the same name exists, the file is not created, but a success state is shown and an empty commit is created.
Steps to reproduce
- Create repository with (necessarily non-empty) directory
imagesin it - Go to tree viewer in GitLab
- Click 'New file '
- Enter
images
Example Project
images/ already existed, and then I tried to create a file images which created this commit: https://gitlab.com/jramsay-reproduce/ce-48130/commit/b451abb5814c3e584930b0fb717f20a1ab14b1b9
What is the current bug behavior?
Commit succeeds partially, creating an empty commit.
What is the expected correct behavior?
Commit should fail, creating no new commits.
Relevant logs and/or screenshots
(Paste any relevant logs - please use code blocks (```) to format console output, logs, and code as it's tough to read otherwise.)
Output of checks
This bug happens on GitLab.com
Edited by 🤖 GitLab Bot 🤖