[Top][All Lists]

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

Re: [PATCH] ls --group-directories-first: symlinks to dirs are dirs too

From: Eric Blake
Subject: Re: [PATCH] ls --group-directories-first: symlinks to dirs are dirs too
Date: Tue, 12 Feb 2008 18:23:39 -0700
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv: Gecko/20071031 Thunderbird/ Mnenhy/

Hash: SHA1

According to Bert Wesarg on 2/12/2008 9:50 AM:
|> Thanks for the patch, but a change in behavior like that
|> requires some serious justification.
| I read the thread in the mail archive. Eric Blake questioned the symlink
| behavior in the first reply (still in the patch tracker):

I'm not sure if the current state of things is more from Francesco's code
or mine, but I do remember the conversation:

|> 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)?
| And indeed a -L with --group-directories-first does sort symlinks to
| directories like directories. But they don't look like symlinks anymore.
| Anyway, this fact was not really discussed, Francesco decided that
| symlinks to directories are non-directories and no one objected.

Additionally, IIRC, one of the reasons that --group-directories-first was
added was to mimic default behavior of a certain 'dir' program popular on
proprietary systems, but those systems did not have symlinks, so there
really is no prior art on how ls should behave on symlinks-to-dirs.

| Currently there is no test for this option, even Francesco has posted
| one which also consider symlinks, and the documentation for this options
| doesn't mention symlinks too. So, IMHO there is no change in documented
| behavior with this patch.

This point I can agree with.  --group-directories-first is relatively new,
and since it is currently silent about behavior on links, I have no
problem with changing that behavior; however, I would insist that if we
make a change, we add test cases and documentation to lock in that
behavior for the future.

- --
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]