Merge branch 'jk/maint-t1304-setfacl'
[gitweb.git] / builtin / send-pack.c
index 9df341c793d58eff215805bf5ca5da383f4a99d9..d5d7105ba2debde9fa6f2f33171d84cc7c25339a 100644 (file)
@@ -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;