int argc;
int err;
- argv = xmalloc((refspec_nr + 11) * sizeof(char *));
+ if (flags & TRANSPORT_PUSH_MIRROR)
+ return error("http transport does not support mirror mode");
+
+ argv = xmalloc((refspec_nr + 12) * sizeof(char *));
argv[0] = "http-push";
argc = 1;
if (flags & TRANSPORT_PUSH_ALL)
args.receivepack = data->receivepack;
args.send_all = !!(flags & TRANSPORT_PUSH_ALL);
+ args.send_mirror = !!(flags & TRANSPORT_PUSH_MIRROR);
args.force_update = !!(flags & TRANSPORT_PUSH_FORCE);
args.use_thin_pack = data->thin;
- args.verbose = transport->verbose;
+ args.verbose = !!(flags & TRANSPORT_PUSH_VERBOSE);
args.dry_run = !!(flags & TRANSPORT_PUSH_DRY_RUN);
return send_pack(&args, transport->url, transport->remote, refspec_nr, refspec);
#define TRANSPORT_PUSH_ALL 1
#define TRANSPORT_PUSH_FORCE 2
#define TRANSPORT_PUSH_DRY_RUN 4
- #define TRANSPORT_PUSH_VERBOSE 8
+ #define TRANSPORT_PUSH_MIRROR 8
++#define TRANSPORT_PUSH_VERBOSE 16
/* Returns a transport suitable for the url */
struct transport *transport_get(struct remote *, const char *);