{"thread":{"id":"24213","subject":"[PATCH] Add known breakage for 'git notes copy'","startedAt":"2010-06-28T07:01:57Z","lastAt":"2010-06-28T22:48:51Z","messageCount":5,"participants":["Bert Wesarg","Jeff King","Jacob Helwig","Johan Herland"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"144370","messageId":"41768aafce7a581e8b601e70826ce77381458a23.1277708369.git.bert.wesarg@googlemail.com","threadId":"24213","inReplyTo":null,"subject":"[PATCH] Add known breakage for 'git notes copy'","fromName":"Bert Wesarg","fromEmail":"bert.wesarg@googlemail.com","sentAt":"2010-06-28T07:01:57Z","receivedAt":"2010-06-28T07:01:57Z","isPatch":true,"sender":{"key":"bert.wesarg@googlemail.com","avatar":"https://avatars.githubusercontent.com/u/111934?v=4"},"body":"'git notes copy' dumps core when no arguments are given.\n\nSigned-off-by: Bert Wesarg <bert.wesarg@googlemail.com>\n---\n t/t3301-notes.sh |    5 +++++\n 1 files changed, 5 insertions(+), 0 deletions(-)\n\ndiff --git a/t/t3301-notes.sh b/t/t3301-notes.sh\nindex 64f32ad..67b0cc2 100755 t/t3301-notes.sh\n--- a/t/t3301-notes.sh\n+++ b/t/t3301-notes.sh\n@@ -1044,4 +1044,9 @@ test_expect_success 'GIT_NOTES_REWRITE_REF overrides config' '\n \tgit log -1 > output &&\n \ttest_cmp expect output\n '\n+\n+test_expect_failure 'git notes copy segfaults' '\n+\tgit notes copy\n+'\n+\n test_done\n-- \n1.7.1.1067.g5aeb7\n"},{"id":"144378","messageId":"20100628085907.GA14014@coredump.intra.peff.net","threadId":"24213","inReplyTo":"41768aafce7a581e8b601e70826ce77381458a23.1277708369.git.bert.wesarg@googlemail.com","subject":"Re: [PATCH] Add known breakage for 'git notes copy'","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2010-06-28T08:59:07Z","receivedAt":"2010-06-28T08:59:07Z","isPatch":true,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"On Mon, Jun 28, 2010 at 09:01:57AM +0200, Bert Wesarg wrote:\n\n> 'git notes copy' dumps core when no arguments are given.\n\nHow about:\n\n-- >8 --\nSubject: [PATCH] notes: check number of parameters to \"git notes copy\"\n\nOtherwise we may segfault with too few parameters.\n\nSigned-off-by: Jeff King <peff@peff.net>\n---\n builtin/notes.c |    4 ++++\n 1 files changed, 4 insertions(+), 0 deletions(-)\n\ndiff --git a/builtin/notes.c b/builtin/notes.c\nindex f1f53a8..190005f 100644\n--- a/builtin/notes.c\n+++ b/builtin/notes.c\n@@ -613,8 +613,12 @@ static int copy(int argc, const char **argv, const char *prefix)\n \t\t\treturn notes_copy_from_stdin(force, rewrite_cmd);\n \t\t}\n \t}\n \n+\tif (argc < 2) {\n+\t\terror(\"too few parameters\");\n+\t\tusage_with_options(git_notes_copy_usage, options);\n+\t}\n \tif (2 < argc) {\n \t\terror(\"too many parameters\");\n \t\tusage_with_options(git_notes_copy_usage, options);\n \t}\n-- \n1.7.1.777.gd07fd\n"},{"id":"144380","messageId":"AANLkTimap7ziJ-NuAV6h7bGP3cX2cDY7rqEbgJ2unQSP@mail.gmail.com","threadId":"24213","inReplyTo":"20100628085907.GA14014@coredump.intra.peff.net","subject":"Re: [PATCH] Add known breakage for 'git notes copy'","fromName":"Bert Wesarg","fromEmail":"bert.wesarg@googlemail.com","sentAt":"2010-06-28T09:12:01Z","receivedAt":"2010-06-28T09:12:01Z","isPatch":true,"sender":{"key":"bert.wesarg@googlemail.com","avatar":"https://avatars.githubusercontent.com/u/111934?v=4"},"body":"On Mon, Jun 28, 2010 at 10:59, Jeff King <peff@peff.net> wrote:\n> On Mon, Jun 28, 2010 at 09:01:57AM +0200, Bert Wesarg wrote:\n>\n>> 'git notes copy' dumps core when no arguments are given.\n>\n> How about:\n\nThanks.\n\nTested-by: Bert Wesarg <Bert.Wesarg@googlemail.com>\n\nFWIW, here is the correct and updated test for this:\n\n-- >8 --\nSubject: [PATCH] notes: add test for git-notes copy with too few arguments\n\nSigned-off-by: Bert Wesarg <bert.wesarg@googlemail.com>\n---\n t/t3301-notes.sh |    5 +++++\n 1 files changed, 5 insertions(+), 0 deletions(-)\n\ndiff --git a/t/t3301-notes.sh b/t/t3301-notes.sh\nindex 64f32ad..dcd962a 100755 t/t3301-notes.sh\n--- a/t/t3301-notes.sh\n+++ b/t/t3301-notes.sh\n@@ -1044,4 +1044,9 @@ test_expect_success 'GIT_NOTES_REWRITE_REF\noverrides config' '\n \tgit log -1 > output &&\n \ttest_cmp expect output\n '\n+\n+test_expect_success 'git notes copy does not segfaults with too few\narguments' '\n+\ttest_must_fail git notes copy\n+'\n+\n test_done\n"},{"id":"144388","messageId":"AANLkTilitBVovB0kzSmGGE0TIQB_u1M9nIESIRvkmigh@mail.gmail.com","threadId":"24213","inReplyTo":"AANLkTimap7ziJ-NuAV6h7bGP3cX2cDY7rqEbgJ2unQSP@mail.gmail.com","subject":"Re: [PATCH] Add known breakage for 'git notes copy'","fromName":"Jacob Helwig","fromEmail":"jacob.helwig@gmail.com","sentAt":"2010-06-28T15:44:44Z","receivedAt":"2010-06-28T15:44:44Z","isPatch":true,"sender":{"key":"jacob.helwig@gmail.com","avatar":"https://avatars.githubusercontent.com/u/14557?v=4"},"body":"On Mon, Jun 28, 2010 at 02:12, Bert Wesarg <bert.wesarg@googlemail.com> wrote:\n> On Mon, Jun 28, 2010 at 10:59, Jeff King <peff@peff.net> wrote:\n>> On Mon, Jun 28, 2010 at 09:01:57AM +0200, Bert Wesarg wrote:\n>>\n>>> 'git notes copy' dumps core when no arguments are given.\n>>\n>> How about:\n>\n> Thanks.\n>\n> Tested-by: Bert Wesarg <Bert.Wesarg@googlemail.com>\n>\n> FWIW, here is the correct and updated test for this:\n>\n> -- >8 --\n> Subject: [PATCH] notes: add test for git-notes copy with too few arguments\n>\n> Signed-off-by: Bert Wesarg <bert.wesarg@googlemail.com>\n> ---\n>  t/t3301-notes.sh |    5 +++++\n>  1 files changed, 5 insertions(+), 0 deletions(-)\n>\n> diff --git a/t/t3301-notes.sh b/t/t3301-notes.sh\n> index 64f32ad..dcd962a 100755 t/t3301-notes.sh\n> --- a/t/t3301-notes.sh\n> +++ b/t/t3301-notes.sh\n> @@ -1044,4 +1044,9 @@ test_expect_success 'GIT_NOTES_REWRITE_REF\n> overrides config' '\n>        git log -1 > output &&\n>        test_cmp expect output\n>  '\n> +\n> +test_expect_success 'git notes copy does not segfaults with too few\n> arguments' '\n> +       test_must_fail git notes copy\n> +'\n> +\n>  test_done\n>\n\nMinor nit: s/does not segfaults/does not segfault/\n"},{"id":"144426","messageId":"201006290048.51490.johan@herland.net","threadId":"24213","inReplyTo":"AANLkTimap7ziJ-NuAV6h7bGP3cX2cDY7rqEbgJ2unQSP@mail.gmail.com","subject":"Re: [PATCH] Add known breakage for 'git notes copy'","fromName":"Johan Herland","fromEmail":"johan@herland.net","sentAt":"2010-06-28T22:48:51Z","receivedAt":"2010-06-28T22:48:51Z","isPatch":true,"sender":{"key":"johan@herland.net","avatar":"https://avatars.githubusercontent.com/u/547031?v=4"},"body":"On Monday 28 June 2010, Bert Wesarg wrote:\n> On Mon, Jun 28, 2010 at 10:59, Jeff King <peff@peff.net> wrote:\n> > On Mon, Jun 28, 2010 at 09:01:57AM +0200, Bert Wesarg wrote:\n> >> 'git notes copy' dumps core when no arguments are given.\n> > \n> > How about:\n> Thanks.\n> \n> Tested-by: Bert Wesarg <Bert.Wesarg@googlemail.com>\n> \n> FWIW, here is the correct and updated test for this:\n\nACK on both patches.\n\n\n...Johan\n\n-- \nJohan Herland, <johan@herland.net>\nwww.herland.net\n"}]}