Skip to content

Gitlab replace line-break \r\n with \n (i.e. changing fingerprint)

Hello. In my developer server I write all the fingerprints (sha1) of the files into a register, so I can monitor for changes done to the files from other locations, which might alarm me of some type of attacks/hacks.

When pushing around 2000 files to Gitlab I see that Gitlab have changed the fingerprint of 58 files. When comparing the files I see they have a different length and the file size uploaded is microscopic smaller. After some more debugging I relies you have changed \r\n break into \n breaks, which will change the fingerprint. Isn't the meaning of a version control to monitor changes done to a file, not to change them?

Do a checksum of the attached file, then try to push it to Gitlab, then rerun a checksum of the file, and you'll se it has changed.version_control.php

Edited by Christian Gundersen