Subject: Re: [PATCH 05/13] transport-helper: use the new done feature to properly do imports

From: Jonathan Nieder <[email-masked]>
Date: Sun, 29 Aug 2010 17:02:39 -0500

Sverre Rabbelier wrote:

> Previously, the helper code would disconnect the helper before
> starting fast-import. This was needed because there was no way to signal
> that the helper was done other than to close stdout (which it would
> do after importing iff the helper noticed it had been disconnected).
[...]
>   I really like what this does for the sanity of the import

Yeah, agreed.

> Instead, request that the fast-export uses the 'done' command
[...]
> --- 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)
>  
> +    print "done"

I am probably not reading carefully enough, but I do not see what
this has to do with fast-export.  Is the patch actually about
something like this?

	Use the 'done' command where possible for remote
	helpers.

	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.