Skip to content

Commit

Permalink
show-ref: fix --quiet --verify
Browse files Browse the repository at this point in the history
Signed-off-by: Junio C Hamano <junkio@cox.net>
  • Loading branch information
Junio C Hamano committed Dec 18, 2006
1 parent 00bc0ec commit dd91429
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions builtin-show-ref.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit dd91429

Please sign in to comment.