Subject: Re: [PATCH v5 03/10] transport-helper: add 'force' to 'export' helpers

From: Junio C Hamano <[email-masked]>
Date: Thu, 31 Oct 2013 11:21:06 -0700

Felipe Contreras <[email-masked]> writes:

> Otherwise they cannot know when to force the push or not (other than
> hacks).
> ...
> diff --git a/transport-helper.c b/transport-helper.c
> index d05fc7c..ed238e5 100644
> --- a/transport-helper.c
> +++ b/transport-helper.c
> @@ -854,6 +854,11 @@ static int push_refs_with_export(struct transport *transport,
>  			die("helper %s does not support dry-run", data->name);
>  	}
>  
> +	if (flags & TRANSPORT_PUSH_FORCE) {
> +		if (set_helper_option(transport, "force", "true") != 0)
> +			die("helper %s does not support 'force'", data->name);
> +	}
> +

Does this cause a "git push --force $there A:B" to fail when $there
is a destination that goes via an existing helper does not suport
"force" option?

Should it fail even when the current value of B is an ancestor of A
(i.e. when an unforced push would succeed)?