From: Junio C Hamano Date: Wed, 14 Nov 2007 11:13:30 +0000 (-0800) Subject: Merge branch 'aw/mirror-push' into jk/send-pack X-Git-Tag: v1.5.4-rc0~152^2~8 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=bcd2e266a6270254212603e90186251116d3cd16;p=git.git Merge branch 'aw/mirror-push' into jk/send-pack * aw/mirror-push: git-push: add documentation for the newly added --mirror mode Add tests for git push'es mirror mode git-push: plumb in --mirror mode Teach send-pack a mirror mode send-pack: segfault fix on forced push send-pack: require --verbose to show update of tracking refs receive-pack: don't mention successful updates more terse push output Conflicts: transport.c transport.h --- bcd2e266a6270254212603e90186251116d3cd16 diff --cc transport.c index 5cb809bff,fad97d7cb..8d9bdbe8d --- a/transport.c +++ b/transport.c @@@ -387,7 -390,10 +390,10 @@@ static int curl_transport_push(struct t int argc; int err; + if (flags & TRANSPORT_PUSH_MIRROR) + return error("http transport does not support mirror mode"); + - argv = xmalloc((refspec_nr + 11) * sizeof(char *)); + argv = xmalloc((refspec_nr + 12) * sizeof(char *)); argv[0] = "http-push"; argc = 1; if (flags & TRANSPORT_PUSH_ALL) @@@ -657,9 -661,10 +663,10 @@@ static int git_transport_push(struct tr 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); diff --cc transport.h index a2a36d029,7f337d2f0..6fb4526cd --- a/transport.h +++ b/transport.h @@@ -30,7 -30,7 +30,8 @@@ struct transport #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 *);