builtin/help.c: speed up is_git_command() by checking for builtin commands first
commitc6127fa3e25551e969d775b0332d37dc84db1969
authorSebastian Schuberth <sschuberth@gmail.com>
Thu, 2 Jan 2014 16:17:11 +0000 (2 17:17 +0100)
committerJunio C Hamano <gitster@pobox.com>
Mon, 6 Jan 2014 19:26:31 +0000 (6 11:26 -0800)
tree7c154b0d3fc8e7a4bd9a19b8cc185297b68b3972
parenta3c5263438f7c0ff7dd4d0d8ea86ed7a84a32d18
builtin/help.c: speed up is_git_command() by checking for builtin commands first

Since 2dce956 is_git_command() is a bit slow as it does file I/O in
the call to list_commands_in_dir(). Avoid the file I/O by adding an
early check for the builtin commands.

Signed-off-by: Sebastian Schuberth <sschuberth@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Documentation/technical/api-builtin.txt
builtin.h
builtin/help.c
git.c