git: ef75877fc2d9 - main - ls: Fix -v and associated test

From: Warner Losh <imp_at_FreeBSD.org>
Date: Mon, 19 Feb 2024 16:51:27 UTC
The branch main has been updated by imp:

URL: https://cgit.FreeBSD.org/src/commit/?id=ef75877fc2d93199aab2b509089136c433af1f20

commit ef75877fc2d93199aab2b509089136c433af1f20
Author:     Warner Losh <imp@FreeBSD.org>
AuthorDate: 2024-02-19 16:48:05 +0000
Commit:     Warner Losh <imp@FreeBSD.org>
CommitDate: 2024-02-19 16:50:04 +0000

    ls: Fix -v and associated test
    
    The cleanup of d854370fa86b7 had a cut and paste error (so f_verssort
    was set to 1 and then to 0 rather thame f_timesort being set to 0).
    
    Fixes: d854370fa86b7
    Sponsored by: Netflix
---
 bin/ls/ls.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/bin/ls/ls.c b/bin/ls/ls.c
index 7ebcc5383863..b5e3578f27bb 100644
--- a/bin/ls/ls.c
+++ b/bin/ls/ls.c
@@ -327,7 +327,7 @@ main(int argc, char *argv[])
 		case 'v':
 			f_verssort = 1;
 			f_sizesort = 0;
-			f_verssort = 0;
+			f_timesort = 0;
 			break;
 		/* Other flags.  Please keep alphabetic. */
 		case ',':
@@ -566,6 +566,7 @@ main(int argc, char *argv[])
 			blocksize /= 512;
 		}
 	}
+
 	/* Select a sort function. */
 	if (f_reversesort) {
 		if (f_sizesort)