Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/git.c
diff options
context:
space:
mode:
authorTeemu Likonen <tlikonen@iki.fi>2008-06-06 01:15:36 +0400
committerJunio C Hamano <gitster@pobox.com>2008-06-06 20:22:18 +0400
commitb7d9681974e61959f10c7b2c1063b7781c5b904e (patch)
treeee681ee4d4a2b0fe673eb0fd9b6a7a777208efd4 /git.c
parente919cb302e75141c2565106bed2f0b6cb8047570 (diff)
Print info about "git help COMMAND" on git's main usage pages
Git's main usage pages did not show "git help" as a way to get more information on a specific subcommand. This patch adds an info line after the list of git commands currently printed by "git", "git help", "git --help" and "git help --all". Signed-off-by: Teemu Likonen <tlikonen@iki.fi> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'git.c')
-rw-r--r--git.c4
1 files changed, 4 insertions, 0 deletions
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];