From: Junio C Hamano Date: Tue, 23 Aug 2011 22:19:45 +0000 (-0700) Subject: Merge branch 'cb/maint-quiet-push' into maint X-Git-Tag: v1.7.6.1~5 X-Git-Url: https://git.lorimer.id.au/gitweb.git/diff_plain/ffa69e61d3c5730bd4b65a465efc130b0ef3c7df?ds=inline;hp=-c Merge branch 'cb/maint-quiet-push' into maint * 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 --- ffa69e61d3c5730bd4b65a465efc130b0ef3c7df diff --combined Documentation/git-receive-pack.txt index 459c08598f,23f9a48dd4..d7b68afbc2 --- a/Documentation/git-receive-pack.txt +++ b/Documentation/git-receive-pack.txt @@@ -8,8 -8,7 +8,8 @@@ git-receive-pack - Receive what is push SYNOPSIS -------- +[verse] - 'git-receive-pack' + 'git-receive-pack' [--quiet] DESCRIPTION ----------- @@@ -35,6 -34,9 +35,9 @@@ are not fast-forwards OPTIONS ------- + --quiet:: + Print only error messages. + :: The repository to sync into. diff --combined Documentation/git-send-pack.txt index bd3eaa69bf,67bcd0c568..bed9e1f097 --- a/Documentation/git-send-pack.txt +++ b/Documentation/git-send-pack.txt @@@ -8,8 -8,7 +8,8 @@@ git-send-pack - Push objects over git p SYNOPSIS -------- +[verse] - 'git send-pack' [--all] [--dry-run] [--force] [--receive-pack=] [--verbose] [--thin] [:] [...] + 'git send-pack' [--all] [--dry-run] [--force] [--receive-pack=] [--quiet] [--verbose] [--thin] [:] [...] DESCRIPTION ----------- @@@ -45,6 -44,9 +45,9 @@@ OPTION the remote repository can lose commits; use it with care. + --quiet:: + Print only error messages. + --verbose:: Run verbosely. diff --combined remote-curl.c index 69831e931a,0393ab92b6..6d3aff62da --- a/remote-curl.c +++ b/remote-curl.c @@@ -473,12 -473,16 +473,12 @@@ static int post_rpc(struct rpc_state *r * the transfer time. */ size_t size; - z_stream stream; + git_zstream stream; int ret; memset(&stream, 0, sizeof(stream)); - ret = deflateInit2(&stream, Z_BEST_COMPRESSION, - Z_DEFLATED, (15 + 16), - 8, Z_DEFAULT_STRATEGY); - if (ret != Z_OK) - die("cannot deflate request; zlib init error %d", ret); - size = deflateBound(&stream, rpc->len); + git_deflate_init_gzip(&stream, Z_BEST_COMPRESSION); + size = git_deflate_bound(&stream, rpc->len); gzip_body = xmalloc(size); stream.next_in = (unsigned char *)rpc->buf; @@@ -486,11 -490,11 +486,11 @@@ stream.next_out = (unsigned char *)gzip_body; stream.avail_out = size; - ret = deflate(&stream, Z_FINISH); + ret = git_deflate(&stream, Z_FINISH); if (ret != Z_STREAM_END) die("cannot deflate request; zlib deflate error %d", ret); - ret = deflateEnd(&stream); + ret = git_deflate_end_gently(&stream); if (ret != Z_OK) die("cannot deflate request; zlib end error %d", ret); @@@ -762,7 -766,9 +762,9 @@@ static int push_git(struct discovery *h argv[argc++] = "--thin"; if (options.dry_run) argv[argc++] = "--dry-run"; - if (options.verbosity > 1) + if (options.verbosity < 0) + argv[argc++] = "--quiet"; + else if (options.verbosity > 1) argv[argc++] = "--verbose"; argv[argc++] = url; for (i = 0; i < nr_spec; i++)