struct ref *remote_refs)
{
char *refname, *msg;
- int status;
+ int status, forced = 0;
if (!prefixcmp(buf->buf, "ok ")) {
status = REF_STATUS_OK;
free(msg);
msg = NULL;
}
+ else if (!strcmp(msg, "forced update")) {
+ forced = 1;
+ free(msg);
+ msg = NULL;
+ }
}
if (*ref)
}
(*ref)->status = status;
+ (*ref)->forced_update |= forced;
(*ref)->remote_status = msg;
return !(status == REF_STATUS_OK);
}
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");