diff options
author | Junio C Hamano <gitster@pobox.com> | 2011-08-17 17:26:05 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2011-08-17 17:26:05 -0700 |
commit | 6dd5622f68157f471c4f784e8c41f39e8c5163fc (patch) | |
tree | 0ec2b265ea60b53afbc0ec52fe61fa2476b4dbfa /transport.c | |
parent | 660578d4da9d71fbc1e553c95d18987b40af5f0f (diff) | |
parent | 0d086b8e33820d7cf87386a912e2939c59822f35 (diff) | |
download | git-6dd5622f68157f471c4f784e8c41f39e8c5163fc.tar.gz |
Merge branch 'cb/maint-quiet-push'
* cb/maint-quiet-push:
receive-pack: do not overstep command line argument array
propagate --quiet to send-pack/receive-pack
Conflicts:
Documentation/git-receive-pack.txt
Documentation/git-send-pack.txt
Diffstat (limited to 'transport.c')
-rw-r--r-- | transport.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/transport.c b/transport.c index c9c8056f9d..98c577804f 100644 --- a/transport.c +++ b/transport.c @@ -482,14 +482,18 @@ static int set_git_option(struct git_transport_options *opts, static int connect_setup(struct transport *transport, int for_push, int verbose) { struct git_transport_data *data = transport->data; + struct strbuf sb = STRBUF_INIT; if (data->conn) return 0; - data->conn = git_connect(data->fd, transport->url, - for_push ? data->options.receivepack : - data->options.uploadpack, + strbuf_addstr(&sb, for_push ? data->options.receivepack : + data->options.uploadpack); + if (for_push && transport->verbose < 0) + strbuf_addstr(&sb, " --quiet"); + data->conn = git_connect(data->fd, transport->url, sb.buf, verbose ? CONNECT_VERBOSE : 0); + strbuf_release(&sb); return 0; } |