From 1f25c50419c5f46cd6b818438fe641cf942ee6ad Mon Sep 17 00:00:00 2001 From: Sverre Rabbelier Date: Sat, 16 Jul 2011 15:03:36 +0200 Subject: transport-helper: use the new done feature where possible 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. The trailing \n in the protocol signals the helper that the connection is about to close, allowing it to do whatever cleanup neccesary. Previously, the connection would already be closed by the time the trailing \n was to be written. Now that the remote-helper protocol uses the new done command in its fast-import streams, this is no longer the case and we can safely write the trailing \n. Signed-off-by: Sverre Rabbelier Acked-by: Jeff King Signed-off-by: Junio C Hamano --- git-remote-testgit.py | 2 ++ 1 file changed, 2 insertions(+) (limited to 'git-remote-testgit.py') diff --git a/git-remote-testgit.py b/git-remote-testgit.py index cdbc49495f..af4d040353 100644 --- a/git-remote-testgit.py +++ b/git-remote-testgit.py @@ -123,6 +123,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. -- cgit v1.2.1