Mon 05 Dec 2005 02:04:18 PM UTC, comment #1:
Several problems with the proposed patch:
No ChangeLog. Also, your patch is incomplete without also touching NEWS and doc/coreutils.texi, not to mention updating the testsuite.
It is big enough that you would need to assign copyright to the FSF before we can consider it.
You did not add a corresponding long option for -e; and -e does not really have a good mneumonic to imply what it is doing (although -d and -D are already taken for --directories-first, and -g and -G are already taken for --group-directories-first. It would be nice if the long option could start with the same letter as the proposed short option).
Your proposed patch treats directory sorts as equal with all other sorts, meaning that there is no way to group directories first, but then sort directories by size and files by size. I envision this feature as independent from --sort, that when it is enabled, directories are always sorted first, but that then the two groups (dirs and non-dirs) can be additionally sorted by whatever --sort option is in effect. That also means that in a --reverse sort, I think directories should still be listed first, not last.
Your patch does not take into account the fact that on systems without dirent.d_type, you will need to stat every file to ensure which files are directories before you can meaningfully group directories first.
Your patch does not take into account what behavior should be used with symlinks to dirs - are they grouped with directories, or with files, or does it depend on other options (such as -L)?
|