builtin/help.c: call load_command_list() only when it is needed
commita3c5263438f7c0ff7dd4d0d8ea86ed7a84a32d18
authorSebastian Schuberth <sschuberth@gmail.com>
Thu, 2 Jan 2014 16:16:30 +0000 (2 17:16 +0100)
committerJunio C Hamano <gitster@pobox.com>
Mon, 6 Jan 2014 19:26:10 +0000 (6 11:26 -0800)
treed1cef2b09296e1ce5e20cf0b1359626435741e2c
parent3f784a4dcbe270a1f48b23177917a1832a777d1c
builtin/help.c: call load_command_list() only when it is needed

This avoids list_commands_in_dir() being called when not needed which is
quite slow due to file I/O in order to list matching files in a directory.

Signed-off-by: Sebastian Schuberth <sschuberth@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin/help.c