From: Junio C Hamano Date: Mon, 18 Dec 2006 02:53:24 +0000 (-0800) Subject: show-ref: fix --quiet --verify X-Git-Tag: v1.5.0-rc0~78 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=dd9142993c0954e2fd325431235bc7556189a01c;p=git.git show-ref: fix --quiet --verify Signed-off-by: Junio C Hamano --- diff --git a/builtin-show-ref.c b/builtin-show-ref.c index 23e0ff8fb..0fd606f39 100644 --- a/builtin-show-ref.c +++ b/builtin-show-ref.c @@ -218,9 +218,11 @@ int cmd_show_ref(int argc, const char **argv, const char *prefix) unsigned char sha1[20]; while (*pattern) { - if (resolve_ref(*pattern, sha1, 1, NULL)) - printf("%s %s\n", sha1_to_hex(sha1), - *pattern); + if (resolve_ref(*pattern, sha1, 1, NULL)) { + if (!quiet) + printf("%s %s\n", + sha1_to_hex(sha1), *pattern); + } else if (!quiet) die("'%s' - not a valid ref", *pattern); else