[PATCH v3 01/10] transport-helper: add 'force' to 'export' helpers
- From
Felipe Contreras <felipe.contreras@gmail.com>
- Date
- Oct 12, 2013, 07:05 UTC
- Message-ID
- <1381561533-20381-7-git-send-email-felipe.contreras@gmail.com>
- In-Reply-To
- <1381561533-20381-1-git-send-email-felipe.contreras@gmail.com>
Otherwise they cannot know when to force the push or not (other than hacks).
Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com> --- transport-helper.c | 5 +++++ 1 file changed, 5 insertions(+)
diff --git a/transport-helper.c b/transport-helper.c index 63cabc3..cd913af 100644 --- a/transport-helper.c +++ b/transport-helper.c @@ -814,6 +814,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); + } + helper = get_helper(transport); write_constant(helper->in, "export\n");
-- 1.8.4-fc