OSDN Git Service

tag: factor out sig detection for tag display
authorMichael J Gruber <git@drmicha.warpmail.net>
Wed, 10 Nov 2010 11:17:29 +0000 (12:17 +0100)
committerJunio C Hamano <gitster@pobox.com>
Wed, 10 Nov 2010 17:40:34 +0000 (09:40 -0800)
Use the factored out code for sig detection when displaying tags.

Signed-off-by: Michael J Gruber <git@drmicha.warpmail.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin/tag.c

index 66feeb0..617a58f 100644 (file)
@@ -68,9 +68,9 @@ static int show_reference(const char *refname, const unsigned char *sha1,
                        return 0;
                }
                /* only take up to "lines" lines, and strip the signature */
+               size = parse_signature(buf, size);
                for (i = 0, sp += 2;
-                               i < filter->lines && sp < buf + size &&
-                               prefixcmp(sp, PGP_SIGNATURE "\n");
+                               i < filter->lines && sp < buf + size;
                                i++) {
                        if (i)
                                printf("\n    ");