Skip to content
This repository was archived by the owner on Nov 9, 2017. It is now read-only.

Commit 54beb02

Browse files
SRabbelierkasal
authored andcommitted
transport-helper: add trailing --
[PT: ensure we add an additional element to the argv array]
1 parent 9da403f commit 54beb02

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

transport-helper.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -435,7 +435,7 @@ static int get_exporter(struct transport *transport,
435435
/* we need to duplicate helper->in because we want to use it after
436436
* fastexport is done with it. */
437437
fastexport->out = dup(helper->in);
438-
fastexport->argv = xcalloc(6 + revlist_args->nr, sizeof(*fastexport->argv));
438+
fastexport->argv = xcalloc(7 + revlist_args->nr, sizeof(*fastexport->argv));
439439
fastexport->argv[argc++] = "fast-export";
440440
fastexport->argv[argc++] = "--use-done-feature";
441441
fastexport->argv[argc++] = data->signed_tags ?
@@ -448,6 +448,8 @@ static int get_exporter(struct transport *transport,
448448
for (i = 0; i < revlist_args->nr; i++)
449449
fastexport->argv[argc++] = revlist_args->items[i].string;
450450

451+
fastexport->argv[argc++] = "--";
452+
451453
fastexport->git_cmd = 1;
452454
return start_command(fastexport);
453455
}

0 commit comments

Comments
 (0)