summaryrefslogtreecommitdiff
path: root/builtin-help.c
diff options
context:
space:
mode:
authorLibravatar Junio C Hamano <junkio@cox.net>2006-07-28 12:33:57 -0700
committerLibravatar Junio C Hamano <junkio@cox.net>2006-07-28 12:33:57 -0700
commit205be1ee07fe509ecfce3825d3709c32f4161e31 (patch)
tree8acdbee0be06aaf500c66152d9411a488781bb6a /builtin-help.c
parentMerge branch 'jc/diff' (diff)
parentgit wrapper: add --git-dir=<path> and --bare options (diff)
downloadtgif-205be1ee07fe509ecfce3825d3709c32f4161e31.tar.xz
Merge branch 'js/alias-p'
* js/alias-p: git wrapper: add --git-dir=<path> and --bare options Allow an alias to start with "-p"
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"))