This is an automated email from the git hooks/post-receive script. Git pushed a commit to branch master in repository fateserver.
commit 279590e77890b6a9270a29d8086160cfbd26b992 Author: Kacper Michajłow <[email protected]> AuthorDate: Thu Jul 30 01:03:26 2026 +0200 Commit: Kacper Michajłow <[email protected]> CommitDate: Wed Aug 12 00:42:15 2026 +0200 index: keep the sort direction per key The loop variable aliases the array element, so stripping "desc" edited @sort in place and left $sdir reversed for every remaining key and every later comparison. Signed-off-by: Kacper Michajłow <[email protected]> --- index.cgi | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/index.cgi b/index.cgi index aecd434..0017efe 100755 --- a/index.cgi +++ b/index.cgi @@ -84,7 +84,6 @@ $allfail = 100 * $allfail / @reps; my $warn = 100 - $allpass - $allfail; my @sort = ('subarch', 'os', 'cc', 'comment', 'slot'); -my $sdir = 1; # default to ascending sorting defined $sort and unshift @sort, split /\/\//, $sort; $sort ||= $sort[0]; @@ -94,15 +93,13 @@ sub nscmp { } sub repcmp { - my $r; - for my $s (@sort) { - if ($s =~ /^desc/) { - $s =~ s/^desc//; - $sdir = -1; - } - last if $r = $sdir * nscmp $$a{$s}, $$b{$s}; + for my $key (@sort) { + # $key aliases the array element, so do not edit it in place. + (my $s = $key) =~ s/^desc//; + my $r = ($s eq $key ? 1 : -1) * nscmp $$a{$s}, $$b{$s}; + return $r if $r; } - return $r; + return 0; }; sub lsort { _______________________________________________ ffmpeg-cvslog mailing list -- [email protected] To unsubscribe send an email to [email protected]
