generate-cmdlist.sh: run "grep | sort", not "sort | grep"

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>

Ævar Arnfjörð Bjarmason committed Nov 5, 2021 at 15:08 UTC 48bcd823d43f9aab4d843a4b1004137a96677f1f
1 file changed +2 -2
generate-cmdlist.sh
+2 -2
@@ -18,8 +18,8 @@ category_list () {
18 command_list "$1" |
19 cut -c 40- |
20 tr ' ' '\012' |
21 - LC_ALL=C sort -u |
22 - grep -v '^$'
21 + grep -v '^$' |
22 + LC_ALL=C sort -u
23 }
24
25 get_synopsis () {