From nobody Wed Feb 28 12:49:05 2024 X-Original-To: dev-commits-src-all@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 4TlDgj5gl8z5BX66; Wed, 28 Feb 2024 12:49:05 +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 4TlDgj4z6Xz4X17; Wed, 28 Feb 2024 12:49:05 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1709124545; 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=Wt4tGaSvT9ZZiAYJd+D5XB4gBgp17LS4AoMsnGHW8h0=; b=dfZ3UZA8lsmyIKfe2JFceX+oIiyM8Ys5QFqzgG8HTNv5YnmP/uFtj6tWzArIRIppMmA1nL 2Ke8qdzGutNh0NHleydPiiSXiqQFgF1gRtuTK6r1sQyMToEHiNJgjrWOIkWAZDQM8g6ccL 48I/1Tl5fRf0O2osTsACdJiRybHMkOS+hhAwwVPlOSLqnQpOe+VJCpSf7S8NCoj1Q6AWVb 3EjhFynzb2Obcg/FzcjPKI13w6E848+Pn2Xfr09+Mk92BbdRGeZq2o6BVqin7rXcb128XO PpBOiS/SgaclRnEPH4jYaROmEbqv+3Kh5LvoN7ep2P3cCOLQfv6tEdU9scjaTg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1709124545; a=rsa-sha256; cv=none; b=X5VFT2CRnev8fm3+HUOBFY8hEGfE706aACZF6n064OpeCNGMBPPoIMdnsyHn3s/zu1VuDX U42h0svtzdr7pumvfvtByqTz2Xz+8b44gOJ+o+3bHPS3KB8um9RjH2IBDEEabb5dp2Zfty FRHjBNVXiJFfZ64f4il99gfaW02EKwec98JkTUcYEXBgEDlhZX08wV3C2rmE/Jq8JrDhNV gtV95XfPYtYsG5QqpsRB9Nnbqgr3+BJmZIULKNn12jrCKbtvgXsuBRnLMEssQ8Sk+0cbuZ 2L4ZCrnbEpxqj3J2bxH6Ml0OuiPX2NLrz+PTaETtIIFp5sMho9HmSEZRk/t2gw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1709124545; 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=Wt4tGaSvT9ZZiAYJd+D5XB4gBgp17LS4AoMsnGHW8h0=; b=dsG4YHf95YhkJVIIgsC7p3FscMDK6ubCNICN3Bss1iwjOiSv6yMWEqdA+8NMgPuR7OHaSP +1Q9NLR+VVmlmWeF7/8QGU5SXagEEnS5K9j+WxZIFRmKm6qJk73PKRKiDJnOadHd23i3QG N4t0NuFTlv5+Xx4GB5UVQpkoQB3jh+hvbWXRs30cXJbyXMKZBERKzOvpPwzNp4yKGw7LJ1 uUUi0hYU3KUYfaUNgv9PmbeEqz4Kd0yZyWS/OjKYNk8CysZnrqrWms46SZ63o2u4x9pS4Y Rm007lBVqVA1AY8/jfeLPsAMWohFYmuwwh61XNGo5o3jlPElIH+L+cstpcb0/Q== 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 4TlDgj41kLzxTn; Wed, 28 Feb 2024 12:49:05 +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 41SCn5AA012756; Wed, 28 Feb 2024 12:49:05 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 41SCn5nl012753; Wed, 28 Feb 2024 12:49:05 GMT (envelope-from git) Date: Wed, 28 Feb 2024 12:49:05 GMT Message-Id: <202402281249.41SCn5nl012753@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Gordon Bergling Subject: git: ff86c97bfa54 - stable/14 - ls: versort incompatible w/ timesort and sizesort List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: gbe X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: ff86c97bfa54f1e305f4ce07e560a4b3780a6477 Auto-Submitted: auto-generated The branch stable/14 has been updated by gbe: URL: https://cgit.FreeBSD.org/src/commit/?id=ff86c97bfa54f1e305f4ce07e560a4b3780a6477 commit ff86c97bfa54f1e305f4ce07e560a4b3780a6477 Author: Alexander Ziaee AuthorDate: 2024-02-02 20:19:07 +0000 Commit: Gordon Bergling CommitDate: 2024-02-28 12:47:08 +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 (cherry picked from commit d854370fa86b74527e57145955b1fa3ca75643a2) --- 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 528ff1594876..0d03fce804f2 100644 --- a/bin/ls/ls.1 +++ b/bin/ls/ls.1 @@ -31,7 +31,7 @@ .\" .\" @(#)ls.1 8.7 (Berkeley) 7/29/94 .\" -.Dd July 18, 2023 +.Dd January 12, 2024 .Dt LS 1 .Os .Sh NAME @@ -459,9 +459,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 842364b67f1f..d358ece2d89e 100644 --- a/bin/ls/ls.c +++ b/bin/ls/ls.c @@ -325,14 +325,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 ',': @@ -446,9 +453,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;