Skip to content

Commit 1207032

Browse files
peffgitster
authored andcommitted
transport: pass "quiet" flag to pack-objects
When pushing over the git protocol, pack-objects gives progress reports about the pack being sent. If "push" is given the --quiet flag, it now passes "-q" to pack-objects, suppressing this output. Signed-off-by: Jeff King <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent afdeeb0 commit 1207032

File tree

3 files changed

+5
-0
lines changed

3 files changed

+5
-0
lines changed

builtin-send-pack.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ static int pack_objects(int fd, struct ref *refs, struct extra_have_objects *ext
4444
NULL,
4545
NULL,
4646
NULL,
47+
NULL,
4748
};
4849
struct child_process po;
4950
int i;
@@ -53,6 +54,8 @@ static int pack_objects(int fd, struct ref *refs, struct extra_have_objects *ext
5354
argv[i++] = "--thin";
5455
if (args->use_ofs_delta)
5556
argv[i++] = "--delta-base-offset";
57+
if (args->quiet)
58+
argv[i++] = "-q";
5659
memset(&po, 0, sizeof(po));
5760
po.argv = argv;
5861
po.in = -1;

send-pack.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33

44
struct send_pack_args {
55
unsigned verbose:1,
6+
quiet:1,
67
send_mirror:1,
78
force_update:1,
89
use_thin_pack:1,

transport.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -892,6 +892,7 @@ static int git_transport_push(struct transport *transport, struct ref *remote_re
892892
args.force_update = !!(flags & TRANSPORT_PUSH_FORCE);
893893
args.use_thin_pack = data->thin;
894894
args.verbose = !!(flags & TRANSPORT_PUSH_VERBOSE);
895+
args.quiet = !!(flags & TRANSPORT_PUSH_QUIET);
895896
args.dry_run = !!(flags & TRANSPORT_PUSH_DRY_RUN);
896897

897898
ret = send_pack(&args, data->fd, data->conn, remote_refs,

0 commit comments

Comments
 (0)