qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH] checkpatch: Don't WARN about missing spaces in


From: Stefan Weil
Subject: Re: [Qemu-devel] [PATCH] checkpatch: Don't WARN about missing spaces in audio files
Date: Sat, 18 Feb 2012 11:56:54 +0100
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.26) Gecko/20120131 Thunderbird/3.1.18

Am 18.02.2012 10:13, schrieb Blue Swirl:
On Fri, Feb 17, 2012 at 15:26, Anthony Liguori <address@hidden> wrote:
Well this was what I was getting at in my previous comments.  If we just
need to reindent < 10 files with a few random changes here and there, then
maybe that isn't so bad.

But if we have to touch every single file in the tree in a significant way,
then no way is it justified.

One way to handle this is gradual reformatting, every time when code
is touched, only changes towards common CODING_STYLE are allowed.
Small, contained reformatting patches should be also allowed, for
example to adjust brace style in one file a time or to remove spaces
at the end of line.

I'd appreciate it very much if we could remove spaces at line endings
for all non binary files as soon as possible.

Newer versions of git (maybe also older ones with appropriate configuration,
see 'git config --help', core.whitespace / blank-at-eol/ apply.whitespace)
complain about patches which add such spaces. Nevertheless even recent patches
did add spaces, so obviously not all committers use that git settings.

It's good practice to use an editor which automatically removes spaces at end of line (I think most editors can be configured to do this). With the current
code, this is difficult because it introduces additional whitespace changes
when I edit a file with spaces which are removed by the editor.



I don't even want to consider something that touches every line of code.
That's effectively creating a new source tree and losing the continuity of
our SCM history.

I think only 'git blame' output would be affected and that is not 100%
reliable anyway, considering for example code movement.

'git blame' can optionally ignore whitespace changes, so that is not
really a problem. It can even ignore code movements :-)
Just use 'git blame -w -C'.

Regards,
Stefan




reply via email to

[Prev in Thread] Current Thread [Next in Thread]