summaryrefslogtreecommitdiff
path: root/builtin
diff options
context:
space:
mode:
authorLibravatar Junio C Hamano <gitster@pobox.com>2012-05-03 15:13:55 -0700
committerLibravatar Junio C Hamano <gitster@pobox.com>2012-05-03 15:13:55 -0700
commit4c732da91cea2156979a0cc73cc772ef024e7b9a (patch)
tree566b6d7db549e6720af66801fb03fdae906b8fe6 /builtin
parentMerge branch 'nd/columns' (diff)
parentt5541: test more combinations of --progress (diff)
downloadtgif-4c732da91cea2156979a0cc73cc772ef024e7b9a.tar.xz
Merge branch 'jk/maint-push-progress'
"git push" over smart-http lost progress output and this resurrects it. By Jeff King * jk/maint-push-progress: t5541: test more combinations of --progress teach send-pack about --[no-]progress send-pack: show progress when isatty(2)
Diffstat (limited to 'builtin')
-rw-r--r--builtin/send-pack.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/builtin/send-pack.c b/builtin/send-pack.c
index 9df341c793..d5d7105ba2 100644
--- a/builtin/send-pack.c
+++ b/builtin/send-pack.c
@@ -410,6 +410,7 @@ int cmd_send_pack(int argc, const char **argv, const char *prefix)
const char *receivepack = "git-receive-pack";
int flags;
int nonfastforward = 0;
+ int progress = -1;
argv++;
for (i = 1; i < argc; i++, argv++) {
@@ -452,6 +453,14 @@ int cmd_send_pack(int argc, const char **argv, const char *prefix)
args.verbose = 1;
continue;
}
+ if (!strcmp(arg, "--progress")) {
+ progress = 1;
+ continue;
+ }
+ if (!strcmp(arg, "--no-progress")) {
+ progress = 0;
+ continue;
+ }
if (!strcmp(arg, "--thin")) {
args.use_thin_pack = 1;
continue;
@@ -492,6 +501,10 @@ int cmd_send_pack(int argc, const char **argv, const char *prefix)
}
}
+ if (progress == -1)
+ progress = !args.quiet && isatty(2);
+ args.progress = progress;
+
if (args.stateless_rpc) {
conn = NULL;
fd[0] = 0;