[Top][All Lists]

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

Re: Old --sort patch revisited

From: Eric Blake
Subject: Re: Old --sort patch revisited
Date: Thu, 03 May 2007 21:09:59 -0600
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv: Gecko/20070221 Thunderbird/ Mnenhy/

Hash: SHA1

According to Michael A Stevens on 5/3/2007 8:46 PM:
> This is in relation to an old bug listed here.
> http://lists.gnu.org/archive/html/bug-coreutils/2005-10/msg00181.html

First, thanks for the efforts, even if Jim decides not to use them.

> I happened to be using an old copy of coreutils and noticed many of the
> old options status -c, atime -u, access -u, use -u did not work. The
> patch in the thread got rid of them but I had already implemented the
> functionality.

The functionality was never there; it was merely a doc bug in the old

> Attached to this e-mail is a patch to add it back in,
> comments welcome. I was not sure exactly how the translations of the
> docs updated but included my best stab at it in there. If someone could
> point me to something that details the development flow for the docs
> that would be appreciated.

Of the files in your patch, only the changes to ls.c are needed; the files
in man/ and po/ are generated files (either by help2man or by the
translation project), so patching them directly is not required and only
makes it harder to see the real patch.  Patches should also include a
ChangeLog entry that summarize the changes, and be generated against the
development head (CVS or git).

> diff -ur coreutils-6.9/src/ls.c coreutils-6.9-sortl/src/ls.c
> --- coreutils-6.9/src/ls.c    2007-03-18 17:36:43.000000000 -0400
> +++ coreutils-6.9-sortl/src/ls.c      2007-05-02 19:08:56.000000000 -0400
> @@ -413,6 +413,8 @@
>      sort_size,                       /* -S */
>      sort_version,            /* -v */
>      sort_time,                       /* -t */
> +    sort_ctime,                      /* -c */
> +    sort_atime,                      /* -u */

Why is this necessary?  It looks like you are trying to support:

ls --sort=ctime

but isn't that already possible with:

ls --sort=time --time=ctime

Or was your intent to make it possible to sort by ctime but still display
atime, as in:

ls -l --sort=ctime --time=atime

although that seems somewhat confusing.

If this patch is accepted, you would also need to update coreutils.texi
and NEWS, as well as the testsuite.

- --
Don't work too hard, make some time for fun as well!

Eric Blake             address@hidden
Version: GnuPG v1.4.5 (Cygwin)
Comment: Public key at home.comcast.net/~ericblake/eblake.gpg
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org


reply via email to

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