Edit on web interface adds carriage returns to file.
Created by: cirosantilli
This only happens on master, not on gitlab.com.
To reproduce:
- create a new repo
- create a file locally that ends in newline:
echo a
. Double check it has no carriage return:hd a
. - push to the new repo
- clone somewhere else:
hd a
says the file hasn't changed as expected. - go to the edit blob view on the web interface
- don't modify the file content: keep it as it.
- enter commit message
- commit. Surprise! Should not commit because no changes.
- clone again somewhere else. Suprise! The file has carriage returns.
Normally, this shouldn't make the commit since the file was not changed, but it does as carriage returns were added.
This is exposed at the following test: https://github.com/gitlabhq/gitlabhq/pull/7856/files#r18390519 which I added to an untested feature.
Does anyone reproduce? If yes, I consider this is a critical bug which affects repository integrity.
This may be https://github.com/gitlabhq/gitlabhq/issues/3982 v2