From 6acbcb927f8e34857fa8f68fcb4f9076941b24ff Mon Sep 17 00:00:00 2001 From: Johannes Schindelin Date: Tue, 25 Jul 2006 20:24:22 +0200 Subject: git wrapper: add --git-dir= 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 Signed-off-by: Junio C Hamano --- builtin-help.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'builtin-help.c') 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")) -- cgit v1.2.3