"Michael S. Tsirkin" <m...@redhat.com> writes: > On Mon, Dec 17, 2012 at 11:59:59AM +0100, Markus Armbruster wrote: >> "Michael S. Tsirkin" <m...@redhat.com> 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 '-'.