diff options
author | Clemens Buchacher <drizzd@aon.at> | 2012-01-08 22:06:20 +0100 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2012-01-08 14:27:28 -0800 |
commit | c207e34f7733df04342e1c0f449f6d3cae501e33 (patch) | |
tree | 977c26fbfc516266749f93682e720c0189041507 /remote-curl.c | |
parent | f47182c852601c045f62bd7f669360a920516311 (diff) | |
download | git-c207e34f7733df04342e1c0f449f6d3cae501e33.tar.gz git-c207e34f7733df04342e1c0f449f6d3cae501e33.tar.xz |
fix push --quiet: add 'quiet' capability to receive-pack
Currently, git push --quiet produces some non-error output, e.g.:
$ git push --quiet
Unpacking objects: 100% (3/3), done.
This fixes a bug reported for the fedora git package:
https://bugzilla.redhat.com/show_bug.cgi?id=725593
Reported-by: Jesse Keating <jkeating@redhat.com>
Cc: Todd Zullinger <tmz@pobox.com>
Commit 90a6c7d4 (propagate --quiet to send-pack/receive-pack)
introduced the --quiet option to receive-pack and made send-pack
pass that option. Older versions of receive-pack do not recognize
the option, however, and terminate immediately. The commit was
therefore reverted.
This change instead adds a 'quiet' capability to receive-pack,
which is a backwards compatible.
In addition, this fixes push --quiet via http: A verbosity of 0
means quiet for remote helpers.
Reported-by: Tobias Ulmer <tobiasu@tmux.org>
Signed-off-by: Clemens Buchacher <drizzd@aon.at>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'remote-curl.c')
-rw-r--r-- | remote-curl.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/remote-curl.c b/remote-curl.c index 48c20b86f..bcbc7fba4 100644 --- a/remote-curl.c +++ b/remote-curl.c @@ -770,7 +770,9 @@ static int push_git(struct discovery *heads, int nr_spec, char **specs) 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++) |