summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: ac58c4c)
raw | patch | inline | side by side (parent: ac58c4c)
author | Michael J Gruber <git@drmicha.warpmail.net> | |
Wed, 10 Nov 2010 11:17:28 +0000 (12:17 +0100) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Wed, 10 Nov 2010 17:40:18 +0000 (09:40 -0800) |
Use the factored out code for sig detection when editing existing
tag bodies (tag -a -f without -m).
Signed-off-by: Michael J Gruber <git@drmicha.warpmail.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
tag bodies (tag -a -f without -m).
Signed-off-by: Michael J Gruber <git@drmicha.warpmail.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin/tag.c | patch | blob | history |
diff --git a/builtin/tag.c b/builtin/tag.c
index d311491e492787ae50aa172f51629abea53eec19..66feeb0c64c4b9986fe629af3b34e949f94bd887 100644 (file)
--- a/builtin/tag.c
+++ b/builtin/tag.c
struct commit_list *with_commit;
};
-#define PGP_SIGNATURE "-----BEGIN PGP SIGNATURE-----"
-
static int show_reference(const char *refname, const unsigned char *sha1,
int flag, void *cb_data)
{
{
unsigned long size;
enum object_type type;
- char *buf, *sp, *eob;
- size_t len;
+ char *buf, *sp;
buf = read_sha1_file(sha1, &type, &size);
if (!buf)
return;
}
sp += 2; /* skip the 2 LFs */
- eob = strstr(sp, "\n" PGP_SIGNATURE "\n");
- if (eob)
- len = eob - sp;
- else
- len = buf + size - sp;
- write_or_die(fd, sp, len);
+ write_or_die(fd, sp, parse_signature(sp, buf + size - sp));
free(buf);
}