Subject: Re: [PATCH 15/19] transport-helper: update ref status after push with export

From: Jonathan Nieder <[email-masked]>
Date: Thu, 9 Jun 2011 04:10:45 -0500

Sverre Rabbelier wrote:

>  Obviously the testgit helper shouldn't just print 'ok' for master,
>  but it demonstrates the idea.
[... and more interesting commentary ...]

The above probably belongs in the commit message.

[...]
> --- a/transport-helper.c
> +++ b/transport-helper.c
> @@ -760,6 +760,7 @@ static int push_refs_with_export(struct transport *transport,
>  	data->no_disconnect_req = 1;
>  	if (finish_command(&exporter))
>  		die("Error while running fast-export");
> +	push_update_refs_status(data, remote_refs);

Now the conversation looks like:

	git>          	done [from fast-export]
	remote helper>	ok refs/heads/master
	remote helper>	[blank line]

and after patch 17:

	git>         	done
	remote helper>	ok refs/heads/master
	remote helper>
	git>

which is to say, this implements the "approach C" mentioned in reply
to patch 10 that ensures that the remote helper gets the blank line
telling it disconnect is imminent.  Good to see.