Last modified: 2013-12-30 06:55:56 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 T41185, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 39185 - Don't highlight trailing whitespace [patch]
Don't highlight trailing whitespace [patch]
Status: RESOLVED WONTFIX
Product: Wikimedia
Classification: Unclassified
Git/Gerrit (Other open bugs)
unspecified
All All
: Unprioritized normal (vote)
: ---
Assigned To: Nobody - You can work on this!
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2012-08-09 02:02 UTC by Tim Starling
Modified: 2013-12-30 06:55 UTC (History)
7 users (show)

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


Attachments
don't show trailing whitespace as a whitespace error (736 bytes, patch)
2012-08-09 02:02 UTC, Tim Starling
Details

Description Tim Starling 2012-08-09 02:02:23 UTC
Created attachment 10945 [details]
don't show trailing whitespace as a whitespace error

Since we switched to Gerrit, people have started complaining that my code has trailing whitespace in it. Of course, my code has always had trailing whitespace in it, I've been using gvim as long as I've been contributing to MediaWiki and that's just what comes out of it. Since trailing whitespace is mostly harmless, here is an untested patch which should stop people complaining about it.
Comment 1 Aaron Schulz 2012-08-09 02:17:55 UTC
For the record, some people only *mention* the trailing whitespace rather than *complain* about it and said people (or person) only does so when there is a larger than usual amount of it.
Comment 2 Chad H. 2012-08-31 14:58:32 UTC
Seeing the trailing whitespace is useful for when people really mess up. I can't see this getting accepted upstream, either.

If someone is complaining over a stray space or something, ask them to stop.
Comment 3 Aaron Schulz 2012-08-31 15:46:25 UTC
Can't we just change the default preference?
Comment 4 Chad H. 2012-08-31 16:09:06 UTC
The preference affects both leading and trailing whitespace though.
Comment 5 Roan Kattouw 2013-02-14 09:16:33 UTC
I'll note that the trailing whitespace thing isn't specific to Gerrit but to git in general: the default colors for git diff also highlight trailing whitespace in red.

I believe one of the reasons why git is so afraid of trailing whitespace is because it can get corrupted when sending commits via e-mail (and then only if put directly in the body rather than in an attachment, and maybe even then only in some cases), but that's a Linux kernel-specific and IMO archaic workflow that we don't use.

(E-mail clients eating trailing whitespace isn't that worrying by itself, but disappearing characters cause failing SHA-1 hash checks, and obviously git freaks out in that case.)
Comment 6 Platonides 2013-03-07 16:57:46 UTC
Splitting the preference is something that should be accepted upstream.

Good note, Roan.

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


Navigation
Links