{"thread":{"id":"36661","subject":"[PATCH] transport-helper: add trailing --","startedAt":"2014-05-15T05:32:14Z","lastAt":"2014-05-16T13:15:34Z","messageCount":6,"participants":["Stepan Kasal","Felipe Contreras","Jeff King","Johannes Schindelin"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"241643","messageId":"20140515053214.GA12133@camelia.ucw.cz","threadId":"36661","inReplyTo":null,"subject":"[PATCH] transport-helper: add trailing --","fromName":"Stepan Kasal","fromEmail":"kasal@ucw.cz","sentAt":"2014-05-15T05:32:14Z","receivedAt":"2014-05-15T05:32:14Z","isPatch":true,"sender":{"key":"kasal@ucw.cz","avatar":"https://avatars.githubusercontent.com/u/1481596?v=4"},"body":"From: Sverre Rabbelier <srabbelier@gmail.com>\nDate: Sat, 28 Aug 2010 20:49:01 -0500\n\n[PT: ensure we add an additional element to the argv array]\n\nSigned-off-by: Stepan Kasal <kasal@ucw.cz>\n---\n\nHi,\n  this patch was present in msysgit from Mar 2012.\nDo you like it?\nI'm sorry, there is no author signoff; is the patch small enough?\n\nStepan\n\n transport-helper.c | 4 +++-\n 1 file changed, 3 insertions(+), 1 deletion(-)\n\ndiff --git a/transport-helper.c b/transport-helper.c\nindex 0e7c330..a01ea47 100644\n--- a/transport-helper.c\n+++ b/transport-helper.c\n@@ -429,7 +429,7 @@ static int get_exporter(struct transport *transport,\n \t/* we need to duplicate helper->in because we want to use it after\n \t * fastexport is done with it. */\n \tfastexport->out = dup(helper->in);\n-\tfastexport->argv = xcalloc(6 + revlist_args->nr, sizeof(*fastexport->argv));\n+\tfastexport->argv = xcalloc(7 + revlist_args->nr, sizeof(*fastexport->argv));\n \tfastexport->argv[argc++] = \"fast-export\";\n \tfastexport->argv[argc++] = \"--use-done-feature\";\n \tfastexport->argv[argc++] = data->signed_tags ?\n@@ -446,6 +446,8 @@ static int get_exporter(struct transport *transport,\n \tfor (i = 0; i < revlist_args->nr; i++)\n \t\tfastexport->argv[argc++] = revlist_args->items[i].string;\n \n+\tfastexport->argv[argc++] = \"--\";\n+\n \tfastexport->git_cmd = 1;\n \treturn start_command(fastexport);\n }\n-- \n1.9.2.msysgit.0.335.gd2a461f\n\n-- \n-- \n*** Please reply-to-all at all times ***\n*** (do not pretend to know who is subscribed and who is not) ***\n*** Please avoid top-posting. ***\nThe msysGit Wiki is here: https://github.com/msysgit/msysgit/wiki - Github accounts are free.\n\nYou received this message because you are subscribed to the Google\nGroups \"msysGit\" group.\nTo post to this group, send email to msysgit@googlegroups.com\nTo unsubscribe from this group, send email to\nmsysgit+unsubscribe@googlegroups.com\nFor more options, and view previous threads, visit this group at\nhttp://groups.google.com/group/msysgit?hl=en_US?hl=en\n\n--- \nYou received this message because you are subscribed to the Google Groups \"msysGit\" group.\nTo unsubscribe from this group and stop receiving emails from it, send an email to msysgit+unsubscribe@googlegroups.com.\nFor more options, visit https://groups.google.com/d/optout.\n"},{"id":"241646","messageId":"53745911291b2_27ec161d2fc0@nysa.notmuch","threadId":"36661","inReplyTo":"20140515053214.GA12133@camelia.ucw.cz","subject":"RE: [PATCH] transport-helper: add trailing --","fromName":"Felipe Contreras","fromEmail":"felipe.contreras@gmail.com","sentAt":"2014-05-15T06:05:05Z","receivedAt":"2014-05-15T06:05:05Z","isPatch":true,"sender":{"key":"felipe.contreras@gmail.com","avatar":"https://avatars.githubusercontent.com/u/8358?v=4"},"body":"Stepan Kasal wrote:\n> From: Sverre Rabbelier <srabbelier@gmail.com>\n> Date: Sat, 28 Aug 2010 20:49:01 -0500\n> \n> [PT: ensure we add an additional element to the argv array]\n> \n> Signed-off-by: Stepan Kasal <kasal@ucw.cz>\n> ---\n> \n> Hi,\n>   this patch was present in msysgit from Mar 2012.\n> Do you like it?\n\nAdding an extra '--' would make sense if we do something like\n'git fast-export $stuff master' and there was a file named master.\nHowever, we do 'git fast-export $stuff refs/heads/master', which case\nthe '--' is a no-nop *always*.\n\nIt doesn't hurt to add it though. I think.\n\n-- \nFelipe Contreras\n\n-- \n-- \n*** Please reply-to-all at all times ***\n*** (do not pretend to know who is subscribed and who is not) ***\n*** Please avoid top-posting. ***\nThe msysGit Wiki is here: https://github.com/msysgit/msysgit/wiki - Github accounts are free.\n\nYou received this message because you are subscribed to the Google\nGroups \"msysGit\" group.\nTo post to this group, send email to msysgit@googlegroups.com\nTo unsubscribe from this group, send email to\nmsysgit+unsubscribe@googlegroups.com\nFor more options, and view previous threads, visit this group at\nhttp://groups.google.com/group/msysgit?hl=en_US?hl=en\n\n--- \nYou received this message because you are subscribed to the Google Groups \"msysGit\" group.\nTo unsubscribe from this group and stop receiving emails from it, send an email to msysgit+unsubscribe@googlegroups.com.\nFor more options, visit https://groups.google.com/d/optout.\n"},{"id":"241659","messageId":"20140515090013.GB27033@sigill.intra.peff.net","threadId":"36661","inReplyTo":"20140515053214.GA12133@camelia.ucw.cz","subject":"Re: [PATCH] transport-helper: add trailing --","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2014-05-15T09:00:13Z","receivedAt":"2014-05-15T09:00:13Z","isPatch":true,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"On Thu, May 15, 2014 at 07:32:14AM +0200, Stepan Kasal wrote:\n\n> From: Sverre Rabbelier <srabbelier@gmail.com>\n> Date: Sat, 28 Aug 2010 20:49:01 -0500\n> \n> [PT: ensure we add an additional element to the argv array]\n> \n> Signed-off-by: Stepan Kasal <kasal@ucw.cz>\n> ---\n> \n> Hi,\n>   this patch was present in msysgit from Mar 2012.\n> Do you like it?\n> I'm sorry, there is no author signoff; is the patch small enough?\n\nIt needs an explanation in the commit message, too. As Felipe noted, I\ndo not think it would help with ambiguity, but it should not hurt, and\nis a reasonable defensive thing to do (but I did not think about it too\nlong, so maybe Sverre has an example that needs it).\n\n> diff --git a/transport-helper.c b/transport-helper.c\n> index 0e7c330..a01ea47 100644\n> --- a/transport-helper.c\n> +++ b/transport-helper.c\n> @@ -429,7 +429,7 @@ static int get_exporter(struct transport *transport,\n>  \t/* we need to duplicate helper->in because we want to use it after\n>  \t * fastexport is done with it. */\n>  \tfastexport->out = dup(helper->in);\n> -\tfastexport->argv = xcalloc(6 + revlist_args->nr, sizeof(*fastexport->argv));\n> +\tfastexport->argv = xcalloc(7 + revlist_args->nr, sizeof(*fastexport->argv));\n\nIt would be nice if this were an argv_array so we would not have to\nworry about managing the array size. This is one of several spots that\nleaks array memory that I have been meaning to fix.\n\nI just posted a series that addresses those leaks and converts this\nsite. I do not want to hold your patch hostage to my series, but\ndepending on the review on my series, you may want to re-roll this on\ntop; you would drop the line above, and change:\n\n> +\tfastexport->argv[argc++] = \"--\";\n\nto:\n\n    argv_array_push(&fastexport->args, \"--\");\n\n-Peff\n\n-- \n-- \n*** Please reply-to-all at all times ***\n*** (do not pretend to know who is subscribed and who is not) ***\n*** Please avoid top-posting. ***\nThe msysGit Wiki is here: https://github.com/msysgit/msysgit/wiki - Github accounts are free.\n\nYou received this message because you are subscribed to the Google\nGroups \"msysGit\" group.\nTo post to this group, send email to msysgit@googlegroups.com\nTo unsubscribe from this group, send email to\nmsysgit+unsubscribe@googlegroups.com\nFor more options, and view previous threads, visit this group at\nhttp://groups.google.com/group/msysgit?hl=en_US?hl=en\n\n--- \nYou received this message because you are subscribed to the Google Groups \"msysGit\" group.\nTo unsubscribe from this group and stop receiving emails from it, send an email to msysgit+unsubscribe@googlegroups.com.\nFor more options, visit https://groups.google.com/d/optout.\n"},{"id":"241661","messageId":"20140515091643.GA13165@camelia.ucw.cz","threadId":"36661","inReplyTo":"20140515090013.GB27033@sigill.intra.peff.net","subject":"Re: [PATCH] transport-helper: add trailing --","fromName":"Stepan Kasal","fromEmail":"kasal@ucw.cz","sentAt":"2014-05-15T09:16:43Z","receivedAt":"2014-05-15T09:16:43Z","isPatch":true,"sender":{"key":"kasal@ucw.cz","avatar":"https://avatars.githubusercontent.com/u/1481596?v=4"},"body":"Hi Peff,\n\nOn Thu, May 15, 2014 at 05:00:13AM -0400, Jeff King wrote:\n> I just posted a series that addresses those leaks and converts this\n> site. I do not want to hold your patch hostage to my series, [...]\n\nno problem, let's return to it later.\n\nStepan\n\n-- \n-- \n*** Please reply-to-all at all times ***\n*** (do not pretend to know who is subscribed and who is not) ***\n*** Please avoid top-posting. ***\nThe msysGit Wiki is here: https://github.com/msysgit/msysgit/wiki - Github accounts are free.\n\nYou received this message because you are subscribed to the Google\nGroups \"msysGit\" group.\nTo post to this group, send email to msysgit@googlegroups.com\nTo unsubscribe from this group, send email to\nmsysgit+unsubscribe@googlegroups.com\nFor more options, and view previous threads, visit this group at\nhttp://groups.google.com/group/msysgit?hl=en_US?hl=en\n\n--- \nYou received this message because you are subscribed to the Google Groups \"msysGit\" group.\nTo unsubscribe from this group and stop receiving emails from it, send an email to msysgit+unsubscribe@googlegroups.com.\nFor more options, visit https://groups.google.com/d/optout.\n"},{"id":"241759","messageId":"alpine.DEB.1.00.1405152028000.14982@s15462909.onlinehome-server.info","threadId":"36661","inReplyTo":"20140515053214.GA12133@camelia.ucw.cz","subject":"Re: [PATCH] transport-helper: add trailing --","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2014-05-15T18:28:25Z","receivedAt":"2014-05-15T18:28:25Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Hi,\n\nOn Thu, 15 May 2014, Stepan Kasal wrote:\n\n> From: Sverre Rabbelier <srabbelier@gmail.com>\n> Date: Sat, 28 Aug 2010 20:49:01 -0500\n> \n> [PT: ensure we add an additional element to the argv array]\n\nIIRC we had problems with refs vs file names.\n\nCiao,\nJohannes\n\n-- \n-- \n*** Please reply-to-all at all times ***\n*** (do not pretend to know who is subscribed and who is not) ***\n*** Please avoid top-posting. ***\nThe msysGit Wiki is here: https://github.com/msysgit/msysgit/wiki - Github accounts are free.\n\nYou received this message because you are subscribed to the Google\nGroups \"msysGit\" group.\nTo post to this group, send email to msysgit@googlegroups.com\nTo unsubscribe from this group, send email to\nmsysgit+unsubscribe@googlegroups.com\nFor more options, and view previous threads, visit this group at\nhttp://groups.google.com/group/msysgit?hl=en_US?hl=en\n\n--- \nYou received this message because you are subscribed to the Google Groups \"msysGit\" group.\nTo unsubscribe from this group and stop receiving emails from it, send an email to msysgit+unsubscribe@googlegroups.com.\nFor more options, visit https://groups.google.com/d/optout.\n"},{"id":"241886","messageId":"53760f762f340_6899d4d2f869@nysa.notmuch","threadId":"36661","inReplyTo":"alpine.DEB.1.00.1405152028000.14982@s15462909.onlinehome-server.info","subject":"Re: [PATCH] transport-helper: add trailing --","fromName":"Felipe Contreras","fromEmail":"felipe.contreras@gmail.com","sentAt":"2014-05-16T13:15:34Z","receivedAt":"2014-05-16T13:15:34Z","isPatch":true,"sender":{"key":"felipe.contreras@gmail.com","avatar":"https://avatars.githubusercontent.com/u/8358?v=4"},"body":"Johannes Schindelin wrote:\n> Hi,\n> \n> On Thu, 15 May 2014, Stepan Kasal wrote:\n> \n> > From: Sverre Rabbelier <srabbelier@gmail.com>\n> > Date: Sat, 28 Aug 2010 20:49:01 -0500\n> > \n> > [PT: ensure we add an additional element to the argv array]\n> \n> IIRC we had problems with refs vs file names.\n\nActually I tried to push a file named refs/heads/master and I saw the\nissue. I'd say it's a very rare issue, and I don't see how it could be\ntriggered with normal files since all the ref names have the full name.\nThat being said I don't think it would hurt.\n\n-- \nFelipe Contreras\n\n-- \n-- \n*** Please reply-to-all at all times ***\n*** (do not pretend to know who is subscribed and who is not) ***\n*** Please avoid top-posting. ***\nThe msysGit Wiki is here: https://github.com/msysgit/msysgit/wiki - Github accounts are free.\n\nYou received this message because you are subscribed to the Google\nGroups \"msysGit\" group.\nTo post to this group, send email to msysgit@googlegroups.com\nTo unsubscribe from this group, send email to\nmsysgit+unsubscribe@googlegroups.com\nFor more options, and view previous threads, visit this group at\nhttp://groups.google.com/group/msysgit?hl=en_US?hl=en\n\n--- \nYou received this message because you are subscribed to the Google Groups \"msysGit\" group.\nTo unsubscribe from this group and stop receiving emails from it, send an email to msysgit+unsubscribe@googlegroups.com.\nFor more options, visit https://groups.google.com/d/optout.\n"}]}