In other words, use fast-export --use-done-feature to add a 'done' command at the end of streams passed to remote helpers' "import" commands, and teach the remote helpers implementing "export" to use the 'done' command in turn when producing their streams. Signed-off-by: Sverre Rabbelier <srabbelier@xxxxxxxxx> --- Unchanged. git-remote-testgit.py | 2 ++ transport-helper.c | 8 ++------ 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/git-remote-testgit.py b/git-remote-testgit.py index 9658355..a8e47d9 100644 --- a/git-remote-testgit.py +++ b/git-remote-testgit.py @@ -124,6 +124,8 @@ def do_import(repo, args): repo = update_local_repo(repo) repo.exporter.export_repo(repo.gitdir, args) + print "done" + def do_export(repo, args): """Imports a fast-import stream from git to testgit. diff --git a/transport-helper.c b/transport-helper.c index 7f3c6c6..b0361c2 100644 --- a/transport-helper.c +++ b/transport-helper.c @@ -375,8 +375,9 @@ 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(4 + revlist_args->nr, sizeof(*fastexport->argv)); + fastexport->argv = xcalloc(5 + revlist_args->nr, sizeof(*fastexport->argv)); fastexport->argv[argc++] = "fast-export"; + fastexport->argv[argc++] = "--use-done-feature"; if (export_marks) fastexport->argv[argc++] = export_marks; if (import_marks) @@ -412,11 +413,8 @@ static int fetch_with_import(struct transport *transport, sendline(data, &buf); strbuf_reset(&buf); } - if (disconnect_helper(transport)) - die("Error while disconnecting helper"); if (finish_command(&fastimport)) die("Error while running fast-import"); - free(fastimport.argv); fastimport.argv = NULL; @@ -762,8 +760,6 @@ static int push_refs_with_export(struct transport *transport, data->no_disconnect_req = 1; if (finish_command(&exporter)) die("Error while running fast-export"); - if (disconnect_helper(transport)) - die("Error while disconnecting helper"); return 0; } -- 1.7.5.1.292.g728120 -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html