git: f80d1c0035ce - stable/13 - sort: Stop "fixing" obsolete key syntax after -- flag

Mark Johnston markj at FreeBSD.org
Thu May 20 14:10:36 UTC 2021


The branch stable/13 has been updated by markj:

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

commit f80d1c0035ce2ee5325271ea28916377f813d737
Author:     Cyril Zhang <cyril at freebsdfoundation.org>
AuthorDate: 2021-05-13 12:52:51 +0000
Commit:     Mark Johnston <markj at FreeBSD.org>
CommitDate: 2021-05-20 13:15:40 +0000

    sort: Stop "fixing" obsolete key syntax after -- flag
    
    PR:             255798
    Reviewed by:    markj
    Sponsored by:   The FreeBSD Foundation
    Differential Revision:  https://reviews.freebsd.org/D30234
    
    (cherry picked from commit fa43162c63790806d0effba5ac98a1a3c6b835e1)
---
 usr.bin/sort/sort.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/usr.bin/sort/sort.c b/usr.bin/sort/sort.c
index fee6f72449e2..d5c18552d914 100644
--- a/usr.bin/sort/sort.c
+++ b/usr.bin/sort/sort.c
@@ -858,6 +858,11 @@ fix_obsolete_keys(int *argc, char **argv)
 
 		arg1 = argv[i];
 
+		if (strcmp(arg1, "--") == 0) {
+			/* Following arguments are treated as filenames. */
+			break;
+		}
+
 		if (strlen(arg1) > 1 && arg1[0] == '+') {
 			int c1, f1;
 			char sopts1[128];


More information about the dev-commits-src-all mailing list