summaryrefslogtreecommitdiff
path: root/Documentation/config/submodule.txt
diff options
context:
space:
mode:
authorLibravatar Ævar Arnfjörð Bjarmason <avarab@gmail.com>2021-11-05 15:08:05 +0100
committerLibravatar Junio C Hamano <gitster@pobox.com>2021-11-05 12:01:13 -0700
commit8d5be8b421cf525a2fa61cb77921c74be7090c0a (patch)
treed1b68deb26cdddc600d935075d6bdd17b8d8c6aa /Documentation/config/submodule.txt
parentgenerate-cmdlist.sh: replace for loop by printf's auto-repeat feature (diff)
downloadtgif-8d5be8b421cf525a2fa61cb77921c74be7090c0a.tar.xz
generate-cmdlist.sh: stop sorting category lines
In a preceding commit we changed the print_command_list() loop to use printf's auto-repeat feature. Let's now get rid of get_category_line() entirely by not sorting the categories. This will change the output of the generated code from e.g.: - { "git-apply", N_("Apply a patch to files and/or to the index"), 0 | CAT_complete | CAT_plumbingmanipulators }, To: + { "git-apply", N_("Apply a patch to files and/or to the index"), 0 | CAT_plumbingmanipulators | CAT_complete }, I.e. the categories are no longer sorted, but as they're OR'd together it won't matter for the end result. This speeds up the generate-cmdlist.sh a bit. Comparing HEAD~ (old) and "master" to this code: 'sh generate-cmdlist.sh command-list.txt' ran 1.07 ± 0.33 times faster than 'sh generate-cmdlist.sh.old command-list.txt' 1.15 ± 0.36 times faster than 'sh generate-cmdlist.sh.master command-list.txt' Suggested-by: Jeff King <peff@peff.net> Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'Documentation/config/submodule.txt')
0 files changed, 0 insertions, 0 deletions