]> git.ipfire.org Git - thirdparty/git.git/commitdiff
generate-cmdlist.sh: run "grep | sort", not "sort | grep"
authorÆvar Arnfjörð Bjarmason <avarab@gmail.com>
Fri, 5 Nov 2021 14:08:03 +0000 (15:08 +0100)
committerJunio C Hamano <gitster@pobox.com>
Fri, 5 Nov 2021 19:01:12 +0000 (12:01 -0700)
This doesn't matter for performance, but let's not include the empty
lines in our sorting. This makes the intent of the code clearer.

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
generate-cmdlist.sh

index 16043e38476657d3eafc42c0af996dd2cf47f5d4..e517c33710a84980194bb45ce083eb321b091a7b 100755 (executable)
@@ -18,8 +18,8 @@ category_list () {
        command_list "$1" |
        cut -c 40- |
        tr ' ' '\012' |
-       LC_ALL=C sort -u |
-       grep -v '^$'
+       grep -v '^$' |
+       LC_ALL=C sort -u
 }
 
 get_synopsis () {