summaryrefslogtreecommitdiff
path: root/builtin-help.c
diff options
context:
space:
mode:
authorJohannes Schindelin <Johannes.Schindelin@gmx.de>2006-07-25 20:24:22 +0200
committerJunio C Hamano <junkio@cox.net>2006-07-25 14:15:47 -0700
commit6acbcb927f8e34857fa8f68fcb4f9076941b24ff (patch)
tree9d759080902551409b91cd9b0211d7984828d46f /builtin-help.c
parent4ab243a944a6013d9e862adadd6fe6152c842401 (diff)
downloadgit-6acbcb927f8e34857fa8f68fcb4f9076941b24ff.tar.gz
git wrapper: add --git-dir=<path> and --bare options
With this, you can say git --bare repack -a -d inside a bare repository, and it will actually work. While at it, also move the --version, --help and --exec-path options to the handle_options() function. While at documenting the new options, also document the --paginate option. Signed-off-by: Johannes Schindelin <Johannes.Schindelin@gmx.de> Signed-off-by: Junio C Hamano <junkio@cox.net>
Diffstat (limited to 'builtin-help.c')
-rw-r--r--builtin-help.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/builtin-help.c b/builtin-help.c
index 335fe5fedc..bc1b4da3bc 100644
--- a/builtin-help.c
+++ b/builtin-help.c
@@ -229,7 +229,7 @@ int cmd_version(int argc, const char **argv, char **envp)
int cmd_help(int argc, const char **argv, char **envp)
{
- const char *help_cmd = argv[1];
+ const char *help_cmd = argc > 1 ? argv[1] : NULL;
if (!help_cmd)
cmd_usage(0, git_exec_path(), NULL);
else if (!strcmp(help_cmd, "--all") || !strcmp(help_cmd, "-a"))