Re: [PATCH 1/3] fast-export: add --signed-tags=warn-strip mode
On Tue, Apr 16, 2013 at 9:48 PM, Junio C Hamano wrote: > That is a valid point. Nobody has complained that the current > warning is too noisy, so perhaps the patch is good as-is? Ah, hadn't realized that. Probably fine then. -- Cheers, Sverre Rabbelier -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH 1/3] fast-export: add --signed-tags=warn-strip mode
John Keeping writes: > Printing one message per tag also matches the current behaviour for > --signed-tags=warn. I don't want to make the behaviour for "warn" and > "warn-strip" different,... That is a valid point. Nobody has complained that the current warning is too noisy, so perhaps the patch is good as-is? What do others think? -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH 1/3] fast-export: add --signed-tags=warn-strip mode
On Mon, Apr 15, 2013 at 09:50:42PM -0700, Sverre Rabbelier wrote: > On Mon, Apr 15, 2013 at 9:47 PM, Junio C Hamano wrote: > > When you see 78 in the output and you know you have 92 tags in the > > repository, is that sufficient to let you go on, or do we also need > > an easy way to tell which ones are those 78 that were stripped and > > the remaining 14 were not stripped? > > > > There is no reason to worry about "some signed tags are stripped but > > not others", so it feels that the number alone should be sufficient, > > I guess. If those remaining 14 weren't stripped, that is (at least > > at the moment) by definition because they are unsigned, annotated > > tags. > > Or because they were not exported? Perhaps "78 tags stripped, 92 > exported in total". I think I prefer Jonathan's suggestion to this one if we need to change it. The reason I didn't do this initially was that I assumed that from a remote helper we would, in general, not be pushing any tags which already exist, so the number of tags to push will be small. Printing one message per tag also matches the current behaviour for --signed-tags=warn. I don't want to make the behaviour for "warn" and "warn-strip" different, so should "warn" also print a summary message instead of a message for each tag? -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH 1/3] fast-export: add --signed-tags=warn-strip mode
Junio C Hamano wrote: > Sverre Rabbelier writes: >> Perhaps it makes sense to instead count the number of signed tags and >> emit "Stripped signature from %d tags"? For example, for git.git it >> would be on the order of a hundred warning lines. > > When you see 78 in the output and you know you have 92 tags in the > repository, is that sufficient to let you go on, or do we also need > an easy way to tell which ones are those 78 that were stripped and > the remaining 14 were not stripped? I suspect the actually relevant information is warning: stripping signature before pushing signed tags The count and the list of signed tags are not too important. -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH 1/3] fast-export: add --signed-tags=warn-strip mode
On Mon, Apr 15, 2013 at 9:47 PM, Junio C Hamano wrote: > When you see 78 in the output and you know you have 92 tags in the > repository, is that sufficient to let you go on, or do we also need > an easy way to tell which ones are those 78 that were stripped and > the remaining 14 were not stripped? > > There is no reason to worry about "some signed tags are stripped but > not others", so it feels that the number alone should be sufficient, > I guess. If those remaining 14 weren't stripped, that is (at least > at the moment) by definition because they are unsigned, annotated > tags. Or because they were not exported? Perhaps "78 tags stripped, 92 exported in total". -- Cheers, Sverre Rabbelier -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH 1/3] fast-export: add --signed-tags=warn-strip mode
Sverre Rabbelier writes: > On Sun, Apr 14, 2013 at 3:57 AM, John Keeping wrote: >> This issues a warning while stripping signatures from signed tags, which >> allows us to use it as default behaviour for remote helpers which cannot >> specify how to handle signed tags. > > Perhaps it makes sense to instead count the number of signed tags and > emit "Stripped signature from %d tags"? For example, for git.git it > would be on the order of a hundred warning lines. When you see 78 in the output and you know you have 92 tags in the repository, is that sufficient to let you go on, or do we also need an easy way to tell which ones are those 78 that were stripped and the remaining 14 were not stripped? There is no reason to worry about "some signed tags are stripped but not others", so it feels that the number alone should be sufficient, I guess. If those remaining 14 weren't stripped, that is (at least at the moment) by definition because they are unsigned, annotated tags. -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH 1/3] fast-export: add --signed-tags=warn-strip mode
On Sun, Apr 14, 2013 at 3:57 AM, John Keeping wrote: > This issues a warning while stripping signatures from signed tags, which > allows us to use it as default behaviour for remote helpers which cannot > specify how to handle signed tags. Perhaps it makes sense to instead count the number of signed tags and emit "Stripped signature from %d tags"? For example, for git.git it would be on the order of a hundred warning lines. -- Cheers, Sverre Rabbelier -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH 1/3] fast-export: add --signed-tags=warn-strip mode
This issues a warning while stripping signatures from signed tags, which allows us to use it as default behaviour for remote helpers which cannot specify how to handle signed tags. Signed-off-by: John Keeping --- Documentation/git-fast-export.txt | 10 ++ builtin/fast-export.c | 8 +++- t/t9350-fast-export.sh| 6 ++ 3 files changed, 19 insertions(+), 5 deletions(-) diff --git a/Documentation/git-fast-export.txt b/Documentation/git-fast-export.txt index feab7a3..03fc8c3 100644 --- a/Documentation/git-fast-export.txt +++ b/Documentation/git-fast-export.txt @@ -27,15 +27,17 @@ OPTIONS Insert 'progress' statements every objects, to be shown by 'git fast-import' during import. ---signed-tags=(verbatim|warn|strip|abort):: +--signed-tags=(verbatim|warn|warn-strip|strip|abort):: Specify how to handle signed tags. Since any transformation after the export can change the tag names (which can also happen when excluding revisions) the signatures will not match. + When asking to 'abort' (which is the default), this program will die -when encountering a signed tag. With 'strip', the tags will be made -unsigned, with 'verbatim', they will be silently exported -and with 'warn', they will be exported, but you will see a warning. +when encountering a signed tag. With 'strip', the tags will silently +be made unsigned, with 'warn-strip' they will be made unsigned but a +warning will be displayed, with 'verbatim', they will be silently +exported and with 'warn', they will be exported, but you will see a +warning. --tag-of-filtered-object=(abort|drop|rewrite):: Specify how to handle tags whose tagged object is filtered out. diff --git a/builtin/fast-export.c b/builtin/fast-export.c index 725c0a7..d60d675 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; diff --git a/t/t9350-fast-export.sh b/t/t9350-fast-export.sh index 9320b4f..2471bc6 100755 --- a/t/t9350-fast-export.sh +++ b/t/t9350-fast-export.sh @@ -146,6 +146,12 @@ test_expect_success 'signed-tags=strip' ' ' +test_expect_success 'signed-tags=warn-strip' ' + git fast-export --signed-tags=warn-strip sign-your-name >output 2>err && + ! grep PGP output && + test -s err +' + test_expect_success 'setup submodule' ' git checkout -f master && -- 1.8.2.694.ga76e9c3.dirty -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html