diff options
| -rw-r--r-- | builtin-show-ref.c | 8 | 
1 files changed, 5 insertions, 3 deletions
| diff --git a/builtin-show-ref.c b/builtin-show-ref.c index 23e0ff8fbf..0fd606f392 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 | 
