Code

show-ref: fix --quiet --verify
authorJunio C Hamano <junkio@cox.net>
Mon, 18 Dec 2006 02:53:24 +0000 (18:53 -0800)
committerJunio C Hamano <junkio@cox.net>
Mon, 18 Dec 2006 02:53:24 +0000 (18:53 -0800)
Signed-off-by: Junio C Hamano <junkio@cox.net>
builtin-show-ref.c

index 23e0ff8fbfea1ca29e4beb18c95475dd8bdae05b..0fd606f392263c641da61ffe6b9ce4b89943fe07 100644 (file)
@@ -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