Merge branch 'tc/transport-verbosity'
authorJunio C Hamano <gitster@pobox.com>
Mon, 15 Mar 2010 07:58:42 +0000 (00:58 -0700)
committerJunio C Hamano <gitster@pobox.com>
Mon, 15 Mar 2010 07:58:42 +0000 (00:58 -0700)
* tc/transport-verbosity:
  transport: update flags to be in running order
  fetch and pull: learn --progress
  push: learn --progress
  transport->progress: use flag authoritatively
  clone: support multiple levels of verbosity
  push: support multiple levels of verbosity
  fetch: refactor verbosity option handling into transport.[ch]
  Documentation/git-push: put --quiet before --verbose
  Documentation/git-pull: put verbosity options before merge/fetch ones
  Documentation/git-clone: mention progress in -v

Conflicts:
transport.h

1  2 
Documentation/git-clone.txt
Documentation/git-push.txt
builtin/clone.c
builtin/fetch.c
builtin/push.c
transport-helper.c
transport.c
transport.h

Simple merge
index 49b6bd9d925f9150a4aaf2f2c4d7439503863d05,8d957244bd6cba71e0387da1dbcffe2ae1da30d6..59dc8b197ecb4b6912c9ec29f83f21c405ef8634
@@@ -141,11 -141,16 +141,17 @@@ useful if you write an alias or script 
  
  --thin::
  --no-thin::
 -      These options are passed to 'git send-pack'.  Thin
 -      transfer spends extra cycles to minimize the number of
 -      objects to be sent and meant to be used on slower connection.
 +      These options are passed to linkgit:git-send-pack[1]. A thin transfer
 +      significantly reduces the amount of sent data when the sender and
 +      receiver share many of the same objects in common. The default is
 +      \--thin.
  
+ -q::
+ --quiet::
+       Suppress all output, including the listing of updated refs,
+       unless an error occurs. Progress is not reported to the standard
+       error stream.
  -v::
  --verbose::
        Run verbosely.
diff --cc builtin/clone.c
Simple merge
diff --cc builtin/fetch.c
Simple merge
diff --cc builtin/push.c
Simple merge
Simple merge
diff --cc transport.c
index 825be9456c79a47726a6bbf35a6efb4d42d21033,e2cfabd7eeda2a6953b2785385f383f998525ca3..8ce39364a1e58b338bc45a4eb524b637ce3a8881
@@@ -786,10 -788,9 +786,10 @@@ static int git_transport_push(struct tr
        args.send_mirror = !!(flags & TRANSPORT_PUSH_MIRROR);
        args.force_update = !!(flags & TRANSPORT_PUSH_FORCE);
        args.use_thin_pack = data->options.thin;
-       args.verbose = !!(flags & TRANSPORT_PUSH_VERBOSE);
-       args.quiet = !!(flags & TRANSPORT_PUSH_QUIET);
+       args.verbose = (transport->verbose > 0);
+       args.quiet = (transport->verbose < 0);
        args.dry_run = !!(flags & TRANSPORT_PUSH_DRY_RUN);
 +      args.porcelain = !!(flags & TRANSPORT_PUSH_PORCELAIN);
  
        ret = send_pack(&args, data->fd, data->conn, remote_refs,
                        &data->extra_have);
@@@ -1046,11 -1052,11 +1067,11 @@@ int transport_push(struct transport *tr
                        transport->get_refs_list(transport, 1);
                struct ref *local_refs = get_local_heads();
                int match_flags = MATCH_REFS_NONE;
-               int verbose = flags & TRANSPORT_PUSH_VERBOSE;
-               int quiet = flags & TRANSPORT_PUSH_QUIET;
+               int verbose = (transport->verbose > 0);
+               int quiet = (transport->verbose < 0);
                int porcelain = flags & TRANSPORT_PUSH_PORCELAIN;
                int pretend = flags & TRANSPORT_PUSH_DRY_RUN;
 -              int ret, err;
 +              int push_ret, ret, err;
  
                if (flags & TRANSPORT_PUSH_ALL)
                        match_flags |= MATCH_REFS_ALL;
diff --cc transport.h
index 096f6e9478301395ca05d81eaac6e53e0acd69b0,d9bbabba0c092ef95069e5d2895d6451065cf256..c59d97388e6fdb1dccd4dca0d41dccc3d129f8fb
@@@ -94,12 -93,9 +99,11 @@@ struct transport 
  #define TRANSPORT_PUSH_FORCE 2
  #define TRANSPORT_PUSH_DRY_RUN 4
  #define TRANSPORT_PUSH_MIRROR 8
- #define TRANSPORT_PUSH_VERBOSE 16
- #define TRANSPORT_PUSH_PORCELAIN 32
- #define TRANSPORT_PUSH_QUIET 64
- #define TRANSPORT_PUSH_SET_UPSTREAM 128
+ #define TRANSPORT_PUSH_PORCELAIN 16
+ #define TRANSPORT_PUSH_SET_UPSTREAM 32
 +#define TRANSPORT_SUMMARY_WIDTH (2 * DEFAULT_ABBREV + 3)
 +
  /* Returns a transport suitable for the url */
  struct transport *transport_get(struct remote *, const char *);