aboutsummaryrefslogtreecommitdiff
path: root/builtin-show-ref.c
diff options
context:
space:
mode:
authorJunio C Hamano <junkio@cox.net>2006-12-17 18:53:24 -0800
committerJunio C Hamano <junkio@cox.net>2006-12-17 18:53:24 -0800
commitdd9142993c0954e2fd325431235bc7556189a01c (patch)
tree296c4aedd46b0f1470c1989346d64f9749805e8e /builtin-show-ref.c
parent00bc0ec26296aad8727dcc75f031c7b11e404f20 (diff)
downloadgit-dd9142993c0954e2fd325431235bc7556189a01c.tar.gz
git-dd9142993c0954e2fd325431235bc7556189a01c.tar.xz
show-ref: fix --quiet --verify
Signed-off-by: Junio C Hamano <junkio@cox.net>
Diffstat (limited to 'builtin-show-ref.c')
-rw-r--r--builtin-show-ref.c8
1 files 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