git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Stepan Kasal <kasal@ucw.cz>
To: GIT Mailing-list <git@vger.kernel.org>
Cc: Sverre Rabbelier <srabbelier@gmail.com>,
	msysGit <msysgit@googlegroups.com>
Subject: [PATCH] transport-helper: add trailing --
Date: Thu, 15 May 2014 07:32:14 +0200	[thread overview]
Message-ID: <20140515053214.GA12133@camelia.ucw.cz> (raw)

From: Sverre Rabbelier <srabbelier@gmail.com>
Date: Sat, 28 Aug 2010 20:49:01 -0500

[PT: ensure we add an additional element to the argv array]

Signed-off-by: Stepan Kasal <kasal@ucw.cz>
---

Hi,
  this patch was present in msysgit from Mar 2012.
Do you like it?
I'm sorry, there is no author signoff; is the patch small enough?

Stepan

 transport-helper.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/transport-helper.c b/transport-helper.c
index 0e7c330..a01ea47 100644
--- a/transport-helper.c
+++ b/transport-helper.c
@@ -429,7 +429,7 @@ static int get_exporter(struct transport *transport,
 	/* we need to duplicate helper->in because we want to use it after
 	 * fastexport is done with it. */
 	fastexport->out = dup(helper->in);
-	fastexport->argv = xcalloc(6 + revlist_args->nr, sizeof(*fastexport->argv));
+	fastexport->argv = xcalloc(7 + revlist_args->nr, sizeof(*fastexport->argv));
 	fastexport->argv[argc++] = "fast-export";
 	fastexport->argv[argc++] = "--use-done-feature";
 	fastexport->argv[argc++] = data->signed_tags ?
@@ -446,6 +446,8 @@ static int get_exporter(struct transport *transport,
 	for (i = 0; i < revlist_args->nr; i++)
 		fastexport->argv[argc++] = revlist_args->items[i].string;
 
+	fastexport->argv[argc++] = "--";
+
 	fastexport->git_cmd = 1;
 	return start_command(fastexport);
 }
-- 
1.9.2.msysgit.0.335.gd2a461f

-- 
-- 
*** Please reply-to-all at all times ***
*** (do not pretend to know who is subscribed and who is not) ***
*** Please avoid top-posting. ***
The msysGit Wiki is here: https://github.com/msysgit/msysgit/wiki - Github accounts are free.

You received this message because you are subscribed to the Google
Groups "msysGit" group.
To post to this group, send email to msysgit@googlegroups.com
To unsubscribe from this group, send email to
msysgit+unsubscribe@googlegroups.com
For more options, and view previous threads, visit this group at
http://groups.google.com/group/msysgit?hl=en_US?hl=en

--- 
You received this message because you are subscribed to the Google Groups "msysGit" group.
To unsubscribe from this group and stop receiving emails from it, send an email to msysgit+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

             reply	other threads:[~2014-05-15  5:32 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-05-15  5:32 Stepan Kasal [this message]
2014-05-15  6:05 ` [PATCH] transport-helper: add trailing -- Felipe Contreras
2014-05-15  9:00 ` Jeff King
2014-05-15  9:16   ` Stepan Kasal
2014-05-15 18:28 ` Johannes Schindelin
2014-05-16 13:15   ` Felipe Contreras

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20140515053214.GA12133@camelia.ucw.cz \
    --to=kasal@ucw.cz \
    --cc=git@vger.kernel.org \
    --cc=msysgit@googlegroups.com \
    --cc=srabbelier@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).