summaryrefslogtreecommitdiff
path: root/transport.c
diff options
context:
space:
mode:
authorAndy Whitcroft <apw@shadowen.org>2007-11-09 23:32:25 (GMT)
committerJunio C Hamano <gitster@pobox.com>2007-11-10 05:14:10 (GMT)
commit94c89ba662e964c544fdb171dc8dd33f95b97942 (patch)
tree2a212d2d9ead2df95b715693d6341a4cd4bcb984 /transport.c
parent28b9d6e548322755bbdb24c28a493862f61b1eba (diff)
downloadgit-94c89ba662e964c544fdb171dc8dd33f95b97942.zip
git-94c89ba662e964c544fdb171dc8dd33f95b97942.tar.gz
git-94c89ba662e964c544fdb171dc8dd33f95b97942.tar.bz2
git-push: plumb in --mirror mode
Plumb in the --mirror mode for git-push. Signed-off-by: Andy Whitcroft <apw@shadowen.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
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 83677fc..fad97d7 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 + 11) * sizeof(char *));
argv[0] = "http-push";
argc = 1;
@@ -655,6 +661,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 = transport->verbose;