From dd9142993c0954e2fd325431235bc7556189a01c Mon Sep 17 00:00:00 2001 From: Junio C Hamano Date: Sun, 17 Dec 2006 18:53:24 -0800 Subject: [PATCH] show-ref: fix --quiet --verify Signed-off-by: Junio C Hamano --- builtin-show-ref.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) 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 -- 2.30.2