This is the mail archive of the
gdb@sourceware.org
mailing list for the GDB project.
Re: Trailing Whitespace
- From: Phil Muldoon <pmuldoon at redhat dot com>
- To: gdb at sourceware dot org
- Date: Thu, 9 Jan 2014 14:57:31 +0000
- Subject: Re: Trailing Whitespace
- Authentication-results: sourceware.org; auth=none
- References: <CA+XNFZP6JzmOGo=nQDd4kab8RK1zvR4sij_zgS7qdPw7C1W9Vw at mail dot gmail dot com> <20140109144455 dot GA2972 at blade dot nx>
- Reply-to: pmuldoon at redhat dot com
On Thu, 09 Jan 2014, Gary Benson wrote:
> Ben Longbons wrote:
> > Therefore, I suggest that someone create a commit that removes all
> > the trailing whitespace. The pressing need is to apply this to gdb/
> > but there is no reason it couldn't be applied to other parts if need
> > be.
> I see nobody replied to this, but it would be pretty nice to have the
> repo cleaned in this way.
>
> Does anybody have any reason not to do this?
Whitespace cleanups inevitably bit-rot unless the maintainer checks
each and every patch for whitespace. This is pretty easy to do in
emacs, but I am not so sure about other editors. It's another weight
on the already burdened shoulders of maintainers.
The simple way to make sure that your patch does not have useless
whitespace included is to run:
git diff --check
That will flag all the whitespace.
Also (and I am not sure if git can get around this somehow) whitespace
cleanups tend to obliterate diffs/patches that were written before the
cleanup took place. This makes merging a massive pain.
So my 2 pence worth is, no, not a good idea ;)
Cheers,
Phil