summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 8ac3ed2)
raw | patch | inline | side by side (parent: 8ac3ed2)
author | Jeff King <peff@peff.net> | |
Sat, 16 Oct 2010 18:37:03 +0000 (02:37 +0800) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Mon, 18 Oct 2010 23:20:19 +0000 (16:20 -0700) |
When pushing via builtin transports (like file://, git://), the
underlying transport helper (in this case, git-pack-objects) did not get
the --progress option, even if it was passed to git push.
Fix this, and update the tests to reflect this.
Note that according to the git-pack-objects documentation, we can safely
apply the usual --progress semantics for the transport commands like
clone and fetch (and for pushing over other smart transports).
Reported-by: Chase Brammer <cbrammer@gmail.com>
Helped-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Tay Ray Chuan <rctay89@gmail.com>
Reviewed-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
underlying transport helper (in this case, git-pack-objects) did not get
the --progress option, even if it was passed to git push.
Fix this, and update the tests to reflect this.
Note that according to the git-pack-objects documentation, we can safely
apply the usual --progress semantics for the transport commands like
clone and fetch (and for pushing over other smart transports).
Reported-by: Chase Brammer <cbrammer@gmail.com>
Helped-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Tay Ray Chuan <rctay89@gmail.com>
Reviewed-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin/send-pack.c | patch | blob | history | |
send-pack.h | patch | blob | history | |
t/t5523-push-upstream.sh | patch | blob | history | |
transport.c | patch | blob | history |
diff --git a/builtin/send-pack.c b/builtin/send-pack.c
index 481602d8ae73612226bcc758f2aedea7f964779c..efd9be67bd6ed8e8e04f3d6a9abd3efe25e9d4a8 100644 (file)
--- a/builtin/send-pack.c
+++ b/builtin/send-pack.c
NULL,
NULL,
NULL,
+ NULL,
};
struct child_process po;
int i;
argv[i++] = "--delta-base-offset";
if (args->quiet)
argv[i++] = "-q";
+ if (args->progress)
+ argv[i++] = "--progress";
memset(&po, 0, sizeof(po));
po.argv = argv;
po.in = -1;
diff --git a/send-pack.h b/send-pack.h
index 60b4ba66eb8cac3378326378dc4e0cbdb88162ac..05d7ab118b3e1473cdf559d3f6337b26bb9aac81 100644 (file)
--- a/send-pack.h
+++ b/send-pack.h
unsigned verbose:1,
quiet:1,
porcelain:1,
+ progress:1,
send_mirror:1,
force_update:1,
use_thin_pack:1,
index f43d76063eb20dc8cb3556c663cbe4daed4547cd..c229fe68f11007fbb96d7b3837c18fd2f306a0bf 100755 (executable)
--- a/t/t5523-push-upstream.sh
+++ b/t/t5523-push-upstream.sh
grep "Writing objects" err
'
-test_expect_failure 'progress messages do not go to non-tty' '
+test_expect_success 'progress messages do not go to non-tty' '
ensure_fresh_upstream &&
# skip progress messages, since stderr is non-tty
! grep "Writing objects" err
'
-test_expect_failure 'progress messages go to non-tty (forced)' '
+test_expect_success 'progress messages go to non-tty (forced)' '
ensure_fresh_upstream &&
# force progress messages to stderr, even though it is non-tty
diff --git a/transport.c b/transport.c
index 4dba6f8815a80093a8ac9edc226d99bba1bb6394..00786606117feea4b33b7e632b8ff8a3c26de4e4 100644 (file)
--- a/transport.c
+++ b/transport.c
@@ -789,6 +789,7 @@ static int git_transport_push(struct transport *transport, struct ref *remote_re
args.use_thin_pack = data->options.thin;
args.verbose = (transport->verbose > 0);
args.quiet = (transport->verbose < 0);
+ args.progress = transport->progress;
args.dry_run = !!(flags & TRANSPORT_PUSH_DRY_RUN);
args.porcelain = !!(flags & TRANSPORT_PUSH_PORCELAIN);