author | Christian Couder <chriscool@tuxfamily.org> | |
Sat, 28 Jun 2008 04:35:03 +0000 (06:35 +0200) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Sat, 28 Jun 2008 06:21:45 +0000 (23:21 -0700) | ||
commit | 2dce956e397be8a769624e8693565b8a30056060 | |
tree | e6e18a59666f7bec399b6852d977c93d77d37cd5 | tree | snapshot |
parent | d0658ec6fac6b0a1830dbd2ead38facaff97fda7 | commit | diff |
help: check early if we have a command, if not try a documentation topic
Before this patch, something like "git help tutorial" did not work,
people had to use "git help gittutorial" which is not very intuitive.
This patch uses the "is_git_command" function to test early if the
argument passed to "git help" is a git command, and if this is not the
case then we prefix the argument with "git" instead of "git-".
This way, things like "git help tutorial" or "git help glossary" will
work fine.
The little downside of this patch is that the "is_git_command" is a
little bit slow.
Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Before this patch, something like "git help tutorial" did not work,
people had to use "git help gittutorial" which is not very intuitive.
This patch uses the "is_git_command" function to test early if the
argument passed to "git help" is a git command, and if this is not the
case then we prefix the argument with "git" instead of "git-".
This way, things like "git help tutorial" or "git help glossary" will
work fine.
The little downside of this patch is that the "is_git_command" is a
little bit slow.
Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
help.c | diff | blob | history |