summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--builtin.h1
-rw-r--r--git.c4
-rw-r--r--help.c2
3 files changed, 7 insertions, 0 deletions
diff --git a/builtin.h b/builtin.h
index 8bda1117e4..b460b2da6f 100644
--- a/builtin.h
+++ b/builtin.h
@@ -5,6 +5,7 @@
extern const char git_version_string[];
extern const char git_usage_string[];
+extern const char git_more_info_string[];
extern void list_common_cmds_help(void);
extern void help_unknown_cmd(const char *cmd);
diff --git a/git.c b/git.c
index 272bf03da3..15a0e71cc1 100644
--- a/git.c
+++ b/git.c
@@ -6,6 +6,9 @@
const char git_usage_string[] =
"git [--version] [--exec-path[=GIT_EXEC_PATH]] [-p|--paginate|--no-pager] [--bare] [--git-dir=GIT_DIR] [--work-tree=GIT_WORK_TREE] [--help] COMMAND [ARGS]";
+const char git_more_info_string[] =
+ "See 'git help COMMAND' for more information on a specific command.";
+
static int handle_options(const char*** argv, int* argc, int* envchanged)
{
int handled = 0;
@@ -427,6 +430,7 @@ int main(int argc, const char **argv)
/* The user didn't specify a command; give them help */
printf("usage: %s\n\n", git_usage_string);
list_common_cmds_help();
+ printf("\n%s\n", git_more_info_string);
exit(1);
}
cmd = argv[0];
diff --git a/help.c b/help.c
index d89d43796f..8aff94c64a 100644
--- a/help.c
+++ b/help.c
@@ -649,12 +649,14 @@ int cmd_help(int argc, const char **argv, const char *prefix)
if (show_all) {
printf("usage: %s\n\n", git_usage_string);
list_commands();
+ printf("%s\n", git_more_info_string);
return 0;
}
if (!argv[0]) {
printf("usage: %s\n\n", git_usage_string);
list_common_cmds_help();
+ printf("\n%s\n", git_more_info_string);
return 0;
}