summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--builtin/send-pack.c14
-rw-r--r--remote-curl.c1
2 files changed, 13 insertions, 2 deletions
diff --git a/builtin/send-pack.c b/builtin/send-pack.c
index 7d22715..d5d7105 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,8 +501,9 @@ int cmd_send_pack(int argc, const char **argv, const char *prefix)
}
}
- if (!args.quiet)
- args.progress = isatty(2);
+ if (progress == -1)
+ progress = !args.quiet && isatty(2);
+ args.progress = progress;
if (args.stateless_rpc) {
conn = NULL;
diff --git a/remote-curl.c b/remote-curl.c
index d159fe7..e5e9490 100644
--- a/remote-curl.c
+++ b/remote-curl.c
@@ -774,6 +774,7 @@ static int push_git(struct discovery *heads, int nr_spec, char **specs)
argv[argc++] = "--quiet";
else if (options.verbosity > 1)
argv[argc++] = "--verbose";
+ argv[argc++] = options.progress ? "--progress" : "--no-progress";
argv[argc++] = url;
for (i = 0; i < nr_spec; i++)
argv[argc++] = specs[i];