Merge branch 'aw/mirror-push' into jk/send-pack
authorJunio C Hamano <gitster@pobox.com>
Wed, 14 Nov 2007 11:13:30 +0000 (03:13 -0800)
committerJunio C Hamano <gitster@pobox.com>
Wed, 14 Nov 2007 11:13:30 +0000 (03:13 -0800)
* 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

1  2 
Documentation/git-push.txt
builtin-push.c
builtin-send-pack.c
transport.c
transport.h

Simple merge
diff --cc builtin-push.c
Simple merge
Simple merge
diff --cc transport.c
index 5cb809bff62a881e34942b2a26d7c04d46db2445,fad97d7cb289e357c9baa637439474449d0f8998..8d9bdbe8dedd1c050e017d509cbc9e87d98a6e88
@@@ -387,7 -390,10 +390,10 @@@ static int curl_transport_push(struct t
        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)
@@@ -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 a2a36d029e700c4ed26936aaf4c95f74d88ab5d7,7f337d2f0f0fea3d1780a896590a67e389b41fb9..6fb4526cda5fc1ee1178fdf1d0840c90b88aa26c
@@@ -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 *);