Closed paulmillar closed 2 months ago
IMPORTANT Please note that, under the Files changed
tab, it is possible to alter the diff so that it excludes whitespace-only changes.
Near the top of the Files changed
tab, there is a cog-wheel icon that controls what kind of diff is shown. Selecting the cog-wheel icon shows a small pop-up menu with the option Hide whitespace
. When this option is enabled, only the BOM change (on the first line) is shown. This removal of the BOM appears as a mysterious change: nothing seems to be different.
I think that enabling the "hide whitespace" option will make reviewing the patch much easier.
Thanks for the clarification, I was kind of lost yesterday.
Maybe it would be a good idea to have something protecting the repository from reverting back to this inconsistency since not all use the same operating system. Do you suggest using dos2unix before every release?
Could we use a .gitattributes
as described here to handle such cases?
* text=auto
*.csv text eol=lf
*.txt text eol=lf
Maybe it would be a good idea to have something protecting the repository from reverting back to this inconsistency since not all use the same operating system.
Yes, I think that would be a good idea.
I didn't know about this gitattributes feature. I'll have a look
In any case, I agree we should have some kind of protection. I'll look into what we can do and may some concrete suggestions (unless you'd like to do that :-)
Hi @gkoum,
I was thinking we should introduce the protection as a separate step. I've created an issue so we don't forget: #141.
Motivation:
We have inconsistent line endings at the moment: the Ontology metadata file uses Unix-style line endings while the PaNET.csv file uses DOS-style line endings. It would be better if the PaNET repository was consistent.
Moreover, Unix tools may convert DOS-style lines to Unix-style lines. This results in large diffs, making it hard to see actual changes.
Modification:
Run the
dos2unix
command on the PaNET.csv. This results in two changes:The line endings are updated from
\r\n
(0x0d 0x0a
) to\n
(0x0a
)The UTF BOM (a three-byte sequence at the file's beginning that is normally not visible) is removed.
Result:
More consistent choice of line ending. Removal of potentially confusing BOM.
Closes: #128