From: Ævar Arnfjörð Bjarmason Date: Fri, 5 Nov 2021 14:08:03 +0000 (+0100) Subject: generate-cmdlist.sh: run "grep | sort", not "sort | grep" X-Git-Tag: v2.35.0-rc0~116^2~5 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=48bcd823d43f9aab4d843a4b1004137a96677f1f;p=thirdparty%2Fgit.git 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 Signed-off-by: Junio C Hamano --- diff --git a/generate-cmdlist.sh b/generate-cmdlist.sh index 16043e3847..e517c33710 100755 --- a/generate-cmdlist.sh +++ b/generate-cmdlist.sh @@ -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 () {