summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 4d590f0)
raw | patch | inline | side by side (parent: 4d590f0)
author | Matthieu Moy <Matthieu.Moy@imag.fr> | |
Thu, 6 Aug 2009 10:47:21 +0000 (12:47 +0200) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Fri, 7 Aug 2009 21:40:29 +0000 (14:40 -0700) |
Signed-off-by: Matthieu Moy <Matthieu.Moy@imag.fr>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin-diff.c | patch | blob | history | |
builtin-log.c | patch | blob | history |
diff --git a/builtin-diff.c b/builtin-diff.c
index 2e51f408f9f3399195604fd23d430c180a7f20a4..ffcdd055ca0b9b30bec2ce1f22e348ec15d58c81 100644 (file)
--- a/builtin-diff.c
+++ b/builtin-diff.c
@@ -218,6 +218,8 @@ static int builtin_diff_files(struct rev_info *revs, int argc, const char **argv
revs->max_count = 3;
else if (!strcmp(argv[1], "-q"))
options |= DIFF_SILENT_ON_REMOVED;
+ else if (!strcmp(argv[1], "-h"))
+ usage(builtin_diff_usage);
else
return error("invalid option: %s", argv[1]);
argv++; argc--;
diff --git a/builtin-log.c b/builtin-log.c
index 30358166e64c5745e979e6231a5de5e0e5111119..3817bf11864dbe5bff2c1004abec2b97210a0c36 100644 (file)
--- a/builtin-log.c
+++ b/builtin-log.c
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)
{
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);
}