summaryrefslogtreecommitdiff
path: root/Documentation/technical
diff options
context:
space:
mode:
authorLibravatar Sebastian Schuberth <sschuberth@gmail.com>2014-01-02 17:17:11 +0100
committerLibravatar Junio C Hamano <gitster@pobox.com>2014-01-06 11:26:31 -0800
commitc6127fa3e25551e969d775b0332d37dc84db1969 (patch)
tree7c154b0d3fc8e7a4bd9a19b8cc185297b68b3972 /Documentation/technical
parentbuiltin/help.c: call load_command_list() only when it is needed (diff)
downloadtgif-c6127fa3e25551e969d775b0332d37dc84db1969.tar.xz
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>
Diffstat (limited to 'Documentation/technical')
-rw-r--r--Documentation/technical/api-builtin.txt4
1 files changed, 2 insertions, 2 deletions
diff --git a/Documentation/technical/api-builtin.txt b/Documentation/technical/api-builtin.txt
index 150a02a558..e3d6e7a79a 100644
--- a/Documentation/technical/api-builtin.txt
+++ b/Documentation/technical/api-builtin.txt
@@ -14,8 +14,8 @@ Git:
. Add the external declaration for the function to `builtin.h`.
-. Add the command to `commands[]` table in `handle_builtin()`,
- defined in `git.c`. The entry should look like:
+. Add the command to the `commands[]` table defined in `git.c`.
+ The entry should look like:
{ "foo", cmd_foo, <options> },
+