Skip to content

Commit

Permalink
transport: pass "quiet" flag to pack-objects
Browse files Browse the repository at this point in the history
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 <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
  • Loading branch information
peff authored and gitster committed Aug 6, 2009
1 parent afdeeb0 commit 1207032
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 0 deletions.
3 changes: 3 additions & 0 deletions builtin-send-pack.c
Expand Up @@ -44,6 +44,7 @@ static int pack_objects(int fd, struct ref *refs, struct extra_have_objects *ext
NULL,
NULL,
NULL,
NULL,
};
struct child_process po;
int i;
Expand All @@ -53,6 +54,8 @@ static int pack_objects(int fd, struct ref *refs, struct extra_have_objects *ext
argv[i++] = "--thin";
if (args->use_ofs_delta)
argv[i++] = "--delta-base-offset";
if (args->quiet)
argv[i++] = "-q";
memset(&po, 0, sizeof(po));
po.argv = argv;
po.in = -1;
Expand Down
1 change: 1 addition & 0 deletions send-pack.h
Expand Up @@ -3,6 +3,7 @@

struct send_pack_args {
unsigned verbose:1,
quiet:1,
send_mirror:1,
force_update:1,
use_thin_pack:1,
Expand Down
1 change: 1 addition & 0 deletions transport.c
Expand Up @@ -892,6 +892,7 @@ static int git_transport_push(struct transport *transport, struct ref *remote_re
args.force_update = !!(flags & TRANSPORT_PUSH_FORCE);
args.use_thin_pack = data->thin;
args.verbose = !!(flags & TRANSPORT_PUSH_VERBOSE);
args.quiet = !!(flags & TRANSPORT_PUSH_QUIET);
args.dry_run = !!(flags & TRANSPORT_PUSH_DRY_RUN);

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

0 comments on commit 1207032

Please sign in to comment.