summaryrefslogtreecommitdiff
path: root/transport.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2007-11-14 11:13:30 (GMT)
committerJunio C Hamano <gitster@pobox.com>2007-11-14 11:13:30 (GMT)
commitbcd2e266a6270254212603e90186251116d3cd16 (patch)
treec0ba0c5c778a770947c22b273b9492853c4d5522 /transport.c
parent2d4eb71c6c06e8f15351d996a9413974e15cab0b (diff)
parentff206748158aa54196bde1462ceaf550a5c2440e (diff)
downloadgit-bcd2e266a6270254212603e90186251116d3cd16.zip
git-bcd2e266a6270254212603e90186251116d3cd16.tar.gz
git-bcd2e266a6270254212603e90186251116d3cd16.tar.bz2
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
Diffstat (limited to 'transport.c')
-rw-r--r--transport.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/transport.c b/transport.c
index 5cb809b..8d9bdbe 100644
--- a/transport.c
+++ b/transport.c
@@ -284,6 +284,9 @@ static int rsync_transport_push(struct transport *transport,
struct child_process rsync;
const char *args[10];
+ if (flags & TRANSPORT_PUSH_MIRROR)
+ return error("rsync transport does not support mirror mode");
+
/* first push the objects */
strbuf_addstr(&buf, transport->url);
@@ -387,6 +390,9 @@ static int curl_transport_push(struct transport *transport, int refspec_nr, cons
int argc;
int err;
+ 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;
@@ -657,6 +663,7 @@ static int git_transport_push(struct transport *transport, int refspec_nr, const
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 = !!(flags & TRANSPORT_PUSH_VERBOSE);