From 99caeed05d3e89176d352104a2b70a77aa7e5d81 Mon Sep 17 00:00:00 2001 From: Jonathan Nieder Date: Mon, 9 Nov 2009 09:05:01 -0600 Subject: Let 'git -h' show usage without a git dir There is no need for "git -h" to depend on being inside a repository. Reported by Gerfried Fuchs through http://bugs.debian.org/462557 Signed-off-by: Jonathan Nieder Signed-off-by: Junio C Hamano --- builtin-reflog.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'builtin-reflog.c') diff --git a/builtin-reflog.c b/builtin-reflog.c index e23b5ef979..749821078d 100644 --- a/builtin-reflog.c +++ b/builtin-reflog.c @@ -698,6 +698,9 @@ static const char reflog_usage[] = int cmd_reflog(int argc, const char **argv, const char *prefix) { + if (argc > 1 && !strcmp(argv[1], "-h")) + usage(reflog_usage); + /* With no command, we default to showing it. */ if (argc < 2 || *argv[1] == '-') return cmd_log_reflog(argc, argv, prefix); -- cgit v1.2.1