summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 75b62b4)
raw | patch | inline | side by side (parent: 75b62b4)
author | Dmitry V. Levin <ldv@altlinux.org> | |
Fri, 23 Feb 2007 17:12:33 +0000 (20:12 +0300) | ||
committer | Junio C Hamano <junkio@cox.net> | |
Sat, 24 Feb 2007 08:17:38 +0000 (00:17 -0800) |
builtin-show-ref.c (cmd_show_ref): Fail if called with --verify option but
without a reference.
Signed-off-by: Dmitry V. Levin <ldv@altlinux.org>
Signed-off-by: Junio C Hamano <junkio@cox.net>
without a reference.
Signed-off-by: Dmitry V. Levin <ldv@altlinux.org>
Signed-off-by: Junio C Hamano <junkio@cox.net>
builtin-show-ref.c | patch | blob | history |
diff --git a/builtin-show-ref.c b/builtin-show-ref.c
index 853f13f6ae9df60e340a6988a9d74bb246df4df6..75211e64f9a850be95de3b85edaafdf0d9a5886a 100644 (file)
--- a/builtin-show-ref.c
+++ b/builtin-show-ref.c
}
if (verify) {
- unsigned char sha1[20];
-
+ if (!pattern)
+ die("--verify requires a reference");
while (*pattern) {
+ unsigned char sha1[20];
+
if (!strncmp(*pattern, "refs/", 5) &&
resolve_ref(*pattern, sha1, 1, NULL)) {
if (!quiet)