]> asedeno.scripts.mit.edu Git - git.git/blobdiff - builtin-push.c
return the prune-packed progress display to the inner loop
[git.git] / builtin-push.c
index 2612f07f74855ad6dec8ccd605279ab3a502e5e2..141380b852771e107ee5ae1df3f8b9e30cfcea6b 100644 (file)
@@ -7,9 +7,9 @@
 #include "builtin.h"
 #include "remote.h"
 
-static const char push_usage[] = "git-push [--all] [--tags] [--receive-pack=<git-receive-pack>] [--repo=all] [-f | --force] [-v] [<repository> <refspec>...]";
+static const char push_usage[] = "git-push [--all] [--dry-run] [--tags] [--receive-pack=<git-receive-pack>] [--repo=all] [-f | --force] [-v] [<repository> <refspec>...]";
 
-static int all, force, thin = 1, verbose;
+static int all, dry_run, force, thin, verbose;
 static const char *receivepack;
 
 static const char **refspec;
@@ -69,6 +69,8 @@ static int do_push(const char *repo)
        argc = 1;
        if (all)
                argv[argc++] = "--all";
+       if (dry_run)
+               argv[argc++] = "--dry-run";
        if (force)
                argv[argc++] = "--force";
        if (receivepack)
@@ -147,6 +149,10 @@ int cmd_push(int argc, const char **argv, const char *prefix)
                        all = 1;
                        continue;
                }
+               if (!strcmp(arg, "--dry-run")) {
+                       dry_run = 1;
+                       continue;
+               }
                if (!strcmp(arg, "--tags")) {
                        add_refspec("refs/tags/*");
                        continue;