Revert "Merge branch 'cb/maint-quiet-push' into maint"
This reverts commit ffa69e61d3c5730bd4b65a465efc130b0ef3c7df, reversing changes made to 4a13c4d14841343d7caad6ed41a152fee550261d. Adding a new command line option to receive-pack and feed it from send-pack is not an acceptable way to add features, as there is no guarantee that your updated send-pack will be talking to updated receive-pack. New features need to be added via the capability mechanism negotiated over the protocol. Signed-off-by: Junio C Hamano <gitster@pobox.com>
Junio C Hamano committed
Sep 6, 2011 at 11:06 UTC
5a277f3ff7cb57e35ce574e93866b6c7e3bf8971
6 files changed
+10
-39
Documentation/git-receive-pack.txt
+1
-4
@@ -9,7 +9,7 @@ git-receive-pack - Receive what is pushed into the repository
9
SYNOPSIS
10
--------
11
[verse]
12
-'git-receive-pack' [--quiet] <directory>
12
+'git-receive-pack' <directory>
13
14
DESCRIPTION
15
-----------
@@ -35,9 +35,6 @@ are not fast-forwards.
35
36
OPTIONS
37
-------
38
---quiet::
39
- Print only error messages.
40
-
38
<directory>::
39
The repository to sync into.
40
Documentation/git-send-pack.txt
+1
-4
@@ -9,7 +9,7 @@ git-send-pack - Push objects over git protocol to another repository
9
SYNOPSIS
10
--------
11
[verse]
12
-'git send-pack' [--all] [--dry-run] [--force] [--receive-pack=<git-receive-pack>] [--quiet] [--verbose] [--thin] [<host>:]<directory> [<ref>...]
12
+'git send-pack' [--all] [--dry-run] [--force] [--receive-pack=<git-receive-pack>] [--verbose] [--thin] [<host>:]<directory> [<ref>...]
13
14
DESCRIPTION
15
-----------
@@ -45,9 +45,6 @@ OPTIONS
45
the remote repository can lose commits; use it with
46
care.
47
48
---quiet::
49
- Print only error messages.
50
-
48
--verbose::
49
Run verbosely.
50
builtin/receive-pack.c
+3
-11
@@ -636,7 +636,7 @@ static const char *parse_pack_header(struct pack_header *hdr)
636
637
static const char *pack_lockfile;
638
639
-static const char *unpack(int quiet)
639
+static const char *unpack(void)
640
{
641
struct pack_header hdr;
642
const char *hdr_err;
@@ -651,10 +651,8 @@ static const char *unpack(int quiet)
651
652
if (ntohl(hdr.hdr_entries) < unpack_limit) {
653
int code, i = 0;
654
- const char *unpacker[5];
654
+ const char *unpacker[4];
655
unpacker[i++] = "unpack-objects";
656
- if (quiet)
657
- unpacker[i++] = "-q";
656
if (receive_fsck_objects)
657
unpacker[i++] = "--strict";
658
unpacker[i++] = hdr_arg;
@@ -755,7 +753,6 @@ static void add_alternate_refs(void)
753
754
int cmd_receive_pack(int argc, const char **argv, const char *prefix)
755
{
758
- int quiet = 0;
756
int advertise_refs = 0;
757
int stateless_rpc = 0;
758
int i;
@@ -769,11 +766,6 @@ int cmd_receive_pack(int argc, const char **argv, const char *prefix)
766
const char *arg = *argv++;
767
768
if (*arg == '-') {
772
- if (!strcmp(arg, "--quiet")) {
773
- quiet = 1;
774
- continue;
775
- }
776
-
769
if (!strcmp(arg, "--advertise-refs")) {
770
advertise_refs = 1;
771
continue;
@@ -822,7 +814,7 @@ int cmd_receive_pack(int argc, const char **argv, const char *prefix)
814
const char *unpack_status = NULL;
815
816
if (!delete_only(commands))
825
- unpack_status = unpack(quiet);
817
+ unpack_status = unpack();
818
execute_commands(commands, unpack_status);
819
if (pack_lockfile)
820
unlink_or_warn(pack_lockfile);
builtin/send-pack.c
+1
-10
@@ -439,10 +439,6 @@ int cmd_send_pack(int argc, const char **argv, const char *prefix)
439
args.force_update = 1;
440
continue;
441
}
442
- if (!strcmp(arg, "--quiet")) {
443
- args.quiet = 1;
444
- continue;
445
- }
442
if (!strcmp(arg, "--verbose")) {
443
args.verbose = 1;
444
continue;
@@ -492,13 +488,8 @@ int cmd_send_pack(int argc, const char **argv, const char *prefix)
488
fd[0] = 0;
489
fd[1] = 1;
490
} else {
495
- struct strbuf sb = STRBUF_INIT;
496
- strbuf_addstr(&sb, receivepack);
497
- if (args.quiet)
498
- strbuf_addstr(&sb, " --quiet");
499
- conn = git_connect(fd, dest, sb.buf,
491
+ conn = git_connect(fd, dest, receivepack,
492
args.verbose ? CONNECT_VERBOSE : 0);
501
- strbuf_release(&sb);
493
}
494
495
memset(&extra_have, 0, sizeof(extra_have));
remote-curl.c
+1
-3
@@ -762,9 +762,7 @@ static int push_git(struct discovery *heads, int nr_spec, char **specs)
762
argv[argc++] = "--thin";
763
if (options.dry_run)
764
argv[argc++] = "--dry-run";
765
- if (options.verbosity < 0)
766
- argv[argc++] = "--quiet";
767
- else if (options.verbosity > 1)
765
+ if (options.verbosity > 1)
766
argv[argc++] = "--verbose";
767
argv[argc++] = url;
768
for (i = 0; i < nr_spec; i++)
transport.c
+3
-7
@@ -482,18 +482,14 @@ static int set_git_option(struct git_transport_options *opts,
482
static int connect_setup(struct transport *transport, int for_push, int verbose)
483
{
484
struct git_transport_data *data = transport->data;
485
- struct strbuf sb = STRBUF_INIT;
485
486
if (data->conn)
487
return 0;
488
490
- strbuf_addstr(&sb, for_push ? data->options.receivepack :
491
- data->options.uploadpack);
492
- if (for_push && transport->verbose < 0)
493
- strbuf_addstr(&sb, " --quiet");
494
- data->conn = git_connect(data->fd, transport->url, sb.buf,
489
+ data->conn = git_connect(data->fd, transport->url,
490
+ for_push ? data->options.receivepack :
491
+ data->options.uploadpack,
492
verbose ? CONNECT_VERBOSE : 0);
496
- strbuf_release(&sb);
493
494
return 0;
495
}