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

Re: [libvirt] proposal: file renames for consistency

On Wed, Aug 22, 2018 at 03:25:31PM -0500, Eric Blake wrote:
> We have an inconsistent mix of multi-word file names that use dash vs.
> underscore to separate those words.
> $ git ls-files '**/*_*' | wc
>    2497    2497  146485
> $ git ls-files '**/*-*' | wc
>    8147    8147  444426
> Some of those are overlaps (meaning we can't make up our minds), such as:
> docs/api_extension/0001-add-to-xml.patch

I think its important to look at the directory breakdown, as we have a
very uneven file layout:

  build-aux/ 5
  docs/ 225
  examples/ 65
  gnulib/ 2
  include/ 18
  m4/ 104
  po/ 103
  src/ 881
  tests/ 8309
  tools/ 80

Essentially all the interesting source code is under src/ since we
got rid of the daemon/ directory, with a little in tools.

The majority of files are in tests/, as example data input files.

If we compare '_' vs '-' for the source code, the picture is very

$ git ls-files '**/*_*' | grep src/ | wc -l
$ git ls-files '**/*-*' | grep src/ | wc -l

so I have a very hard time justifying that we should rename all
our src files to use '-', when the precedent is 10:1 in favour
of '_'.

In the tests directory things are more complicated, because we require
some precise filenames. For example, we have a whole set of files that
are replicating the Linux sysfs file structure and those must use _
because Linux used _ in sysfs.  We have other files which include the
architecture name, and so must be "x86_64", not "x86-64". This prevents
us removing almost all use of '_' in tests/, with only a few exceptions.

|: https://berrange.com      -o-    https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org         -o-            https://fstop138.berrange.com :|
|: https://entangle-photo.org    -o-    https://www.instagram.com/dberrange :|

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