summaryrefslogtreecommitdiff
path: root/transport-helper.c
diff options
context:
space:
mode:
authorFelipe Contreras <felipe.contreras@gmail.com>2013-11-12 14:56:56 -0600
committerJunio C Hamano <gitster@pobox.com>2013-11-12 13:34:32 -0800
commit510fa6f5188d715050899eee221c739f1c0a8b12 (patch)
tree8c0e297298060f5ae0e1d0b96f35b6fcc89e6529 /transport-helper.c
parent5a75353fe381b344a33d7a89f7803e4a24d2ddcf (diff)
downloadgit-510fa6f5188d715050899eee221c739f1c0a8b12.tar.gz
transport-helper: add 'force' to 'export' helpers
Otherwise they cannot know when to force the push or not (other than hacks). Tests-by: Richard Hansen <rhansen@bbn.com> Documentation-by: Richard Hansen <rhansen@bbn.com> Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'transport-helper.c')
-rw-r--r--transport-helper.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/transport-helper.c b/transport-helper.c
index d05fc7c276..bcf5469bcc 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)
+ warning("helper %s does not support 'force'", data->name);
+ }
+
helper = get_helper(transport);
write_constant(helper->in, "export\n");