Re: [PATCH 04/13] transport-helper: check status code of finish_command

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Sverre Rabbelier wrote:

> --- a/transport-helper.c
> +++ b/transport-helper.c
> @@ -410,8 +412,11 @@ static int fetch_with_import(struct transport *transport,
>  		sendline(data, &buf);
>  		strbuf_reset(&buf);
>  	}
> -	disconnect_helper(transport);
> -	finish_command(&fastimport);
> +	if(disconnect_helper(transport))
> +		die("Error while disconnecting helper");
> +	if (finish_command(&fastimport))
> +		die("Error while running fast-import");

Nit: missing space after "if".

> +
>  	free(fastimport.argv);
>  	fastimport.argv = NULL;
>  
> @@ -751,8 +756,10 @@ static int push_refs_with_export(struct transport *transport,
>  		die("Couldn't run fast-export");
>  
>  	data->no_disconnect_req = 1;
> -	finish_command(&exporter);
> -	disconnect_helper(transport);
> +	if(finish_command(&exporter))
> +		die("Error while running fast-export");
> +	if(disconnect_helper(transport))

Likewise.

Thanks for this.  A test would be nice if someone has time to write
one.
--
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


[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]