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

  1. Create repository with (necessarily non-empty) directory images in it
  2. Go to tree viewer in GitLab
  3. Click 'New file '
  4. 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 Sep 02, 2020 by 🤖 GitLab Bot 🤖
Assignee Loading
Time tracking Loading