diff options
author | Junio C Hamano <gitster@pobox.com> | 2013-04-24 16:30:50 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2013-04-24 16:30:50 -0700 |
commit | cd33b41c695be45974be38fb2f47768fc1b17190 (patch) | |
tree | 8fe251d196337118b2108c7a43a03b6347c798e8 /builtin | |
parent | Sync with maint (diff) | |
parent | transport-helper: add 'signed-tags' capability (diff) | |
download | tgif-cd33b41c695be45974be38fb2f47768fc1b17190.tar.xz |
Merge branch 'jk/remote-helper-with-signed-tags'
Allows remote-helpers to declare they can handle signed tags, and
issue a warning when using those that don't.
* jk/remote-helper-with-signed-tags:
transport-helper: add 'signed-tags' capability
transport-helper: pass --signed-tags=warn-strip to fast-export
fast-export: add --signed-tags=warn-strip mode
Diffstat (limited to 'builtin')
-rw-r--r-- | builtin/fast-export.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/builtin/fast-export.c b/builtin/fast-export.c index 725c0a7dca..d60d675f6f 100644 --- a/builtin/fast-export.c +++ b/builtin/fast-export.c @@ -24,7 +24,7 @@ static const char *fast_export_usage[] = { }; static int progress; -static enum { ABORT, VERBATIM, WARN, STRIP } signed_tag_mode = ABORT; +static enum { ABORT, VERBATIM, WARN, WARN_STRIP, STRIP } signed_tag_mode = ABORT; static enum { ERROR, DROP, REWRITE } tag_of_filtered_mode = ERROR; static int fake_missing_tagger; static int use_done_feature; @@ -40,6 +40,8 @@ static int parse_opt_signed_tag_mode(const struct option *opt, signed_tag_mode = VERBATIM; else if (!strcmp(arg, "warn")) signed_tag_mode = WARN; + else if (!strcmp(arg, "warn-strip")) + signed_tag_mode = WARN_STRIP; else if (!strcmp(arg, "strip")) signed_tag_mode = STRIP; else @@ -428,6 +430,10 @@ static void handle_tag(const char *name, struct tag *tag) /* fallthru */ case VERBATIM: break; + case WARN_STRIP: + warning ("Stripping signature from tag %s", + sha1_to_hex(tag->object.sha1)); + /* fallthru */ case STRIP: message_size = signature + 1 - message; break; |