diff options
author | Junio C Hamano <gitster@pobox.com> | 2010-03-15 00:58:42 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2010-03-15 00:58:42 -0700 |
commit | 53997a30f8138f41d1d9c7a45e84106cc21c0558 (patch) | |
tree | 656769918ccf2ffce554de623edb4a24e990d89e /transport.h | |
parent | 66bce02ec459123d07c3f0230906cc2f8e36504c (diff) | |
parent | 212cfe157effe53537ec42f156fbf7415441efd0 (diff) | |
download | git-53997a30f8138f41d1d9c7a45e84106cc21c0558.tar.gz |
Merge branch 'tc/transport-verbosity'
* 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
Diffstat (limited to 'transport.h')
-rw-r--r-- | transport.h | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/transport.h b/transport.h index 096f6e9478..c59d97388e 100644 --- a/transport.h +++ b/transport.h @@ -80,7 +80,12 @@ struct transport { int (*disconnect)(struct transport *connection); char *pack_lockfile; signed verbose : 3; - /* Force progress even if stderr is not a tty */ + /** + * Transports should not set this directly, and should use this + * value without having to check isatty(2), -q/--quiet + * (transport->verbose < 0), etc. - checking has already been done + * in transport_set_verbosity(). + **/ unsigned progress : 1; /* * If transport is at least potentially smart, this points to @@ -94,10 +99,9 @@ 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 */ @@ -129,6 +133,8 @@ struct transport *transport_get(struct remote *, const char *); **/ int transport_set_option(struct transport *transport, const char *name, const char *value); +void transport_set_verbosity(struct transport *transport, int verbosity, + int force_progress); int transport_push(struct transport *connection, int refspec_nr, const char **refspec, int flags, |