From nobody Fri Feb 02 20:23:00 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TRRzS4W4Dz58CFV; Fri, 2 Feb 2024 20:23:00 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4TRRzS3YBfz4xtd; Fri, 2 Feb 2024 20:23:00 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1706905380; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=m0kW0VbJPSYs+KQF7bBUezAbkgwiKugXa2lq6luhV7E=; b=i9oHyYVOj+zU1dKGofKUIg12+BGSUKuKTXdq3pZnQ96yjpzEnkh30T9ya8bZhybSiSk1+p uDZVt62Anj3672VGveKoXiiLPabzWAn4kgnSBAPEaXE6HxpP2oaEMS4Mh2IUWa9afQJjZq sGIpGlBarIQXdufhf9FjIhDd53GsRPsM/OIItjGzo09YbRF1IGLsk9QO1JuvPl/aindH+T 4OrpC0uVXzvgmQCdbUm3z4W/mHcMPSNPu9cXW41P0l7U2ft6ONNExsjQnIaB3BXdyYEExo uTihfWCTnoYiqGjKwErPs7fPy/TKLiz1EbGvh8K/XuyeUfToP9xtNfHVubmlFw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1706905380; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=m0kW0VbJPSYs+KQF7bBUezAbkgwiKugXa2lq6luhV7E=; b=yGWR5/V/VsUS4QRpTi6lRI0DPvn6mYCUebtNprnzqYJT1B+3Fsy/NoLMJakKHM2x/6UunS Cvq13G/Eav1LnV0NCgn4E4RppkR/KgdWZGPYdydBoF8CTlR0OJ0kviTJUGRm4vps7yuy2g N+/IXkwt1ktF5BOv5f93rSJPGTeE/pABAVaHcVQgo7mETWll26maBuxj9EUq0H+Na410d2 3bylpfPCmn+p3f37aXEVRZCVCN6MWVYYCTaK3HsFuyMhQVgjzuNdsWCts+yQisHC7TcJ3y WKd/z/AnU2dUZwcKlwV2mKm8cTjBLe+QncgyA0EoZi8UZfEkT/LHZJ2nsDhj8g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1706905380; a=rsa-sha256; cv=none; b=nZceNY3Ln+BA8oY7/ksd54XfGh1hi7MzpLnU0E2MOrKoG9yD+fWjI6DZUcbOnsXU4u4sWI ZfcmP6Hk3LmjvYc0namwU2z73RfKzVvKQezGWK0PAfUDEaAKv+UwT8k7gDuVD/4WsJI2Hz eIxyQXTBbVq1LDYji5iOuWYp/782ap7615YLWE9Xsq1AHg++oOFPlrNhJO/P+SoBI1TGec Q40CXWDO/iP7vAWU9eJFVjyB6d0OmQNq/PnPeqpuA7cLsOl0yDof4uFrTqL+ycFb45k9I8 gJtoQpQ1ZYD73Cb8SEYtz0UFpCOi13gXI8TINI2Cwbc78L+RtqEi2cmDqTtxtw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4TRRzS2Y1bzlC2; Fri, 2 Feb 2024 20:23:00 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 412KN0uf088505; Fri, 2 Feb 2024 20:23:00 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 412KN0EU088502; Fri, 2 Feb 2024 20:23:00 GMT (envelope-from git) Date: Fri, 2 Feb 2024 20:23:00 GMT Message-Id: <202402022023.412KN0EU088502@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Warner Losh Subject: git: d854370fa86b - main - ls: versort incompatible w/ timesort and sizesort List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: d854370fa86b74527e57145955b1fa3ca75643a2 Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=d854370fa86b74527e57145955b1fa3ca75643a2 commit d854370fa86b74527e57145955b1fa3ca75643a2 Author: Alexander Ziaee AuthorDate: 2024-02-02 20:19:07 +0000 Commit: Warner Losh CommitDate: 2024-02-02 20:19:10 +0000 ls: versort incompatible w/ timesort and sizesort ls.1: versort incompatible w/ timesort and sizesort Reviewed by: imp Pull Request: https://github.com/freebsd/freebsd-src/pull/825 --- bin/ls/ls.1 | 6 +++--- bin/ls/ls.c | 12 ++++++++---- 2 files changed, 11 insertions(+), 7 deletions(-) diff --git a/bin/ls/ls.1 b/bin/ls/ls.1 index 4f680d97ea0b..d3daf6e12019 100644 --- a/bin/ls/ls.1 +++ b/bin/ls/ls.1 @@ -29,7 +29,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd July 18, 2023 +.Dd January 12, 2024 .Dt LS 1 .Os .Sh NAME @@ -457,9 +457,9 @@ options all override each other; the last one specified determines the file time used. .Pp The -.Fl S +.Fl S , t and -.Fl t +.Fl v options override each other; the last one specified determines the sort order used. .Pp diff --git a/bin/ls/ls.c b/bin/ls/ls.c index 6af7715fa5f0..7ebcc5383863 100644 --- a/bin/ls/ls.c +++ b/bin/ls/ls.c @@ -313,14 +313,21 @@ main(int argc, char *argv[]) case 'A': f_listdot = 1; break; - /* The -t and -S options override each other. */ + /* The -S, -t and -v options override each other. */ case 'S': f_sizesort = 1; f_timesort = 0; + f_verssort = 0; break; case 't': f_timesort = 1; f_sizesort = 0; + f_verssort = 0; + break; + case 'v': + f_verssort = 1; + f_sizesort = 0; + f_verssort = 0; break; /* Other flags. Please keep alphabetic. */ case ',': @@ -434,9 +441,6 @@ main(int argc, char *argv[]) case 's': f_size = 1; break; - case 'v': - f_verssort = 1; - break; case 'w': f_nonprint = 0; f_octal = 0;