qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PULL] pci,net,misc infrastructure


From: Markus Armbruster
Subject: Re: [Qemu-devel] [PULL] pci,net,misc infrastructure
Date: Mon, 17 Dec 2012 13:30:40 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.1 (gnu/linux)

"Michael S. Tsirkin" <address@hidden> writes:

> On Mon, Dec 17, 2012 at 11:59:59AM +0100, Markus Armbruster wrote:
>> "Michael S. Tsirkin" <address@hidden> writes:
>> 
>> > On Fri, Dec 14, 2012 at 09:37:17PM +0000, Blue Swirl wrote:
>> >> Perhaps the use of '-' vs. '_' in file names could be unified while
>> >> renaming. I think most new files use dash.
>> 
>> Yes, please!
>> 
>> > I can do this in a follow up patch but first let's put this rule in
>> > coding style file. As it is more files use _ than -.
>> > And I'm not sure what's the point of using dash, as opposed
>> > to underscore: underscore seems more consistent.
>> 
>> Actually, '-' is more common:
>> 
>> $ git-ls-files | wc -l
>> 2839
>> $ git-ls-files | grep [-_] | wc -l
>> 2150
>> $ git-ls-files | grep _ | wc -l
>> 1124
>> $ git-ls-files | grep -- - | wc -l
>> 1567
>
> I think you counted target-XXX linux-user etc multiple times.

If you want just basenames, no directories:

$ git-ls-files | sed 's#.*/##g' | grep [-_] | wc -l
1698
$ git-ls-files | sed 's#.*/##g' | grep _ | wc -l
1121
$ git-ls-files | sed 's#.*/##g' | grep -- - | wc -l
588

If we exclude tests/, which has tons of '_', we get:

$ git-ls-files | grep -v ^tests/ | sed 's#.*/##g' | grep _ | wc -l
486
$ git-ls-files | grep -v ^tests/ | sed 's#.*/##g' | grep -- - | wc -l
546

Either way, precedence isn't really conclusive.  It's a matter of taste
anyway.  I happen to prefer '-'.



reply via email to

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