show-ref: fix --quiet --verify

Signed-off-by: Junio C Hamano <junkio@cox.net>
This commit is contained in:
Junio C Hamano
2006-12-17 18:53:24 -08:00
parent 00bc0ec262
commit dd9142993c

View File

@ -218,9 +218,11 @@ int cmd_show_ref(int argc, const char **argv, const char *prefix)
unsigned char sha1[20]; unsigned char sha1[20];
while (*pattern) { while (*pattern) {
if (resolve_ref(*pattern, sha1, 1, NULL)) if (resolve_ref(*pattern, sha1, 1, NULL)) {
printf("%s %s\n", sha1_to_hex(sha1), if (!quiet)
*pattern); printf("%s %s\n",
sha1_to_hex(sha1), *pattern);
}
else if (!quiet) else if (!quiet)
die("'%s' - not a valid ref", *pattern); die("'%s' - not a valid ref", *pattern);
else else