Skip to content

File mode changes are not always visible in the merge request diff view

Summary

File mode changes to a file are not visible in the merge request diff view if there are changes to the contents of the file as well (See screenshot 1) or if the file was renamed (See screenshot 2).

However, if the only changes are to the file mode, then everything works as expected (See screenshot 3).

Steps to reproduce

Change the file mode of a certain file, eg from 644 to 755 & make some additional changes to the contents of the file as well. Open a merge request & you'll see the changes to the contents, but the changes to the file mode will not be visible.

What is the current bug behavior?

The changes to the file mode are not visible in the merge request diff view if there are changes to the contents as well or the file was renamed.

What is the expected correct behavior?

Changes to the file mode should always be visible, regardless of whether there were any changes to the contents or filename.

Relevant logs and/or screenshots

Screenshot 1: image1__1_

Screenshot 2: image3

Screenshot 3: image2__1_

Output of checks

This bug happens on GitLab.com

Edited by Bero