diff options
author | Matthieu Moy <Matthieu.Moy@imag.fr> | 2009-08-06 12:47:21 +0200 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2009-08-07 14:40:29 -0700 |
commit | 1c370ea4e519f8facaf321b633f79eb68a14a0db (patch) | |
tree | f7056dbecb874b4d4709614375484876ee66ab7e /builtin-log.c | |
parent | git-ls-files.txt: clarify what "other files" mean for --other (diff) | |
download | tgif-1c370ea4e519f8facaf321b633f79eb68a14a0db.tar.xz |
Show usage string for 'git log -h', 'git show -h' and 'git diff -h'
Signed-off-by: Matthieu Moy <Matthieu.Moy@imag.fr>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin-log.c')
-rw-r--r-- | builtin-log.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/builtin-log.c b/builtin-log.c index 30358166e6..3817bf1186 100644 --- a/builtin-log.c +++ b/builtin-log.c @@ -27,6 +27,10 @@ static int default_show_root = 1; static const char *fmt_patch_subject_prefix = "PATCH"; static const char *fmt_pretty; +static const char * const builtin_log_usage = + "git log [<options>] [<since>..<until>] [[--] <path>...]\n" + " or: git show [options] <object>..."; + static void cmd_log_init(int argc, const char **argv, const char *prefix, struct rev_info *rev) { @@ -61,6 +65,8 @@ static void cmd_log_init(int argc, const char **argv, const char *prefix, rev->show_decorations = 1; } else if (!strcmp(arg, "--source")) { rev->show_source = 1; + } else if (!strcmp(arg, "-h")) { + usage(builtin_log_usage); } else die("unrecognized argument: %s", arg); } |