diff options
| author | Junio C Hamano <gitster@pobox.com> | 2025-10-28 10:29:09 -0700 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2025-10-28 10:29:09 -0700 |
| commit | 3deb97fe24eccb1245e9323475f10cfba705e08f (patch) | |
| tree | b26109be4ef286cc83b327401bcee4cbade0677f /builtin/fast-export.c | |
| parent | Merge branch 'ds/sparse-checkout-clean' (diff) | |
| parent | fast-import: add '--signed-tags=<mode>' option (diff) | |
| download | git-3deb97fe24eccb1245e9323475f10cfba705e08f.tar.gz git-3deb97fe24eccb1245e9323475f10cfba705e08f.zip | |
Merge branch 'cc/fast-import-strip-signed-tags'
"git fast-import" is taught to handle signed tags, just like it
recently learned to handle signed commits, in different ways.
* cc/fast-import-strip-signed-tags:
fast-import: add '--signed-tags=<mode>' option
fast-export: handle all kinds of tag signatures
t9350: properly count annotated tags
lib-gpg: allow tests with GPGSM or GPGSSH prereq first
doc: git-tag: stop focusing on GPG signed tags
Diffstat (limited to 'builtin/fast-export.c')
| -rw-r--r-- | builtin/fast-export.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/builtin/fast-export.c b/builtin/fast-export.c index dc2486f9a8..7adbc55f0d 100644 --- a/builtin/fast-export.c +++ b/builtin/fast-export.c @@ -931,9 +931,8 @@ static void handle_tag(const char *name, struct tag *tag) /* handle signed tags */ if (message) { - const char *signature = strstr(message, - "\n-----BEGIN PGP SIGNATURE-----\n"); - if (signature) + size_t sig_offset = parse_signed_buffer(message, message_size); + if (sig_offset < message_size) switch (signed_tag_mode) { case SIGN_ABORT: die("encountered signed tag %s; use " @@ -950,7 +949,7 @@ static void handle_tag(const char *name, struct tag *tag) oid_to_hex(&tag->object.oid)); /* fallthru */ case SIGN_STRIP: - message_size = signature + 1 - message; + message_size = sig_offset; break; } } |
