From owner-freebsd-hackers@FreeBSD.ORG Mon Jun 21 13:30:04 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 1B0B116A4CE for ; Mon, 21 Jun 2004 13:30:04 +0000 (GMT) Received: from ussenterprise.ufp.org (ussenterprise.ufp.org [208.185.30.210]) by mx1.FreeBSD.org (Postfix) with ESMTP id CBD6D43D41 for ; Mon, 21 Jun 2004 13:30:03 +0000 (GMT) (envelope-from bicknell@ussenterprise.ufp.org) Received: from ussenterprise.ufp.org (bicknell@localhost [127.0.0.1]) by ussenterprise.ufp.org (8.12.9/8.12.9) with ESMTP id i5LDU3tJ096733 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Mon, 21 Jun 2004 09:30:03 -0400 (EDT) Received: (from bicknell@localhost) by ussenterprise.ufp.org (8.12.9/8.12.9/Submit) id i5LDU3Uo096732 for freebsd-hackers@freebsd.org; Mon, 21 Jun 2004 09:30:03 -0400 (EDT) Date: Mon, 21 Jun 2004 09:30:03 -0400 From: Leo Bicknell To: freebsd-hackers@freebsd.org Message-ID: <20040621133003.GA96338@ussenterprise.ufp.org> Mail-Followup-To: freebsd-hackers@freebsd.org References: <20040621054406.GA927@VARK.homeunix.com> <200406210910.aa18808@salmon.maths.tcd.ie> <20040621091649.GA92422@iconoplex.co.uk> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="vtzGhvizbBRQ85DL" Content-Disposition: inline In-Reply-To: <20040621091649.GA92422@iconoplex.co.uk> Organization: United Federation of Planets X-PGP-Key: http://www.ufp.org/~bicknell/ Subject: Re: /bin/ls sorting bug? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 21 Jun 2004 13:30:04 -0000 --vtzGhvizbBRQ85DL Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable In a message written on Mon, Jun 21, 2004 at 10:16:49AM +0100, Paul Robinso= n wrote: > For what it's worth the original patch looked good to me. The nanosecond= =20 > patch is fine too. Please, no more intimate discussion of a command line= =20 I'd like to put forth a different argument why the nanosecond patch is a better patch. While I think the particular sort order (current behavior vrs non nano patch vrs nano patch) is largely unimportant, I think consistency is very important. It's quite common to do things like using diff on the output of commands like ls (indeed, I think several of the built in periodic scripts to this), and for that having a _reproduceable_ order is important. Since today, for almost all users nanos is 0 there's no impact on most of the users. For the few users where nanos isn't 0, the impact is that if we do the non-nanos patch now, and then at some point in the future add the nanos patch, at that transition old and new ls will produce different output for the nanos users. So, if we're going to alter the output and make people look at their diffs (or whatever) once with puzzlement, we should make sure it's only once. Put another way, the man page says: -t Sort by time modified (most recently modified first) before so= rt- ing the operands by lexicographical order. Since it doesn't have a resolution, if I was a nanos user and it didn't sort by nanos, I'd be a bit annoyed. Having -t work correctly is the right option. The fact that there is no way to display nanos is a separate bug. Don't let the existance of one bug prevent you =66rom fixing another one. Note, I advocate -T display nanos. Humm, I didn't want to debate command line options (as the parent suggested) but I put two in my post. Can't win 'em all. --=20 Leo Bicknell - bicknell@ufp.org - CCIE 3440 PGP keys at http://www.ufp.org/~bicknell/ Read TMBG List - tmbg-list-request@tmbg.org, www.tmbg.org --vtzGhvizbBRQ85DL Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.4 (FreeBSD) iD8DBQFA1uLbNh6mMG5yMTYRAlazAJ9D7yfXTeO9czqfmsMVJlrj5S6f8ACfQp02 C1D6TQgm+NxSsfavMZ3aNh8= =7Vv7 -----END PGP SIGNATURE----- --vtzGhvizbBRQ85DL--