UserCommitFiles overwrites directories when creating a file with the same name
UserCommitFiles
overwrites a directory without warning when creating a file with the directory's name. This was present in the original Ruby implementation and is followed in the Go port of UserCommitFiles
. This seems like an oversight as an error is returned when trying to overwrite a file with a directory.
Test case for the behavior: https://gitlab.com/gitlab-org/gitaly/-/blob/da36dd82d246d1315a7459f797095da62a61ea3a/internal/gitaly/service/operations/commit_files_test.go#L262