Last modified: 2014-09-26 22:26:40 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T53754, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 51754 - Add a Gerrit check for file line endings
Add a Gerrit check for file line endings
Status: NEW
Product: Wikimedia
Classification: Unclassified
Continuous integration (Other open bugs)
unspecified
All All
: Low enhancement (vote)
: ---
Assigned To: Nobody - You can work on this!
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2013-07-20 17:28 UTC by Ingo Malchow
Modified: 2014-09-26 22:26 UTC (History)
7 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Ingo Malchow 2013-07-20 17:28:53 UTC
Currently we at KDE are syncing sources of mediawiki in our own repo, to have a smooth upgrade path with our own setup.
But one of our own hooks for a push rejects any commit that includes files with windows line ending. 
One could argue, why exclude windows line endings. This is just an agreement for a common file layout, and to have nice and clean file diffs.

The mediawiki sources are usually quite fine and already provide unix line endings overall, so a manual check is not necessary.
But from time to time some files come through that have the wrong line ending. If you don't check you end up with false commits which fail during push, and that leads to commit reverts, adjusting, adding back and pushing again.
Latest problem was even in the jquery.js file, something that more or less is maintained upstream.

I am sure i am not the only one who suffers from that problem. So it would be maybe a good idea if gerrit checks each files' line ending automatically and rejects certain ones.
Better diffs, better logs ;)
Comment 1 Chad H. 2013-07-20 23:23:56 UTC
Is there a place where incorrect line endings have shown up? Users should be able to control this on their own local clones (or via .gitattributes on an individual repository in Gerrit).

This should explain it pretty well: http://timclem.wordpress.com/2012/03/01/mind-the-end-of-your-line/
Comment 2 Ingo Malchow 2013-07-21 00:51:07 UTC
Thanks for the link, nice read, and really helpful.

currently it shows in 3 files in REL1_21 branch, namely
includes/filerepo/LocalRepo.php
resources/jquery/jquery.js
skins/common/images/question.svg

But it happened on a few occasions in the past already. So consider this just a suggestion that (maybe additionally) gerrit checks for line endings as well during a push operation, as obviously wrong files can still slip through.

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links