OSDN Git Service

pack-objects: split implications of --all-progress from progress activation
[git-core/git.git] / builtin-pack-objects.c
index 02f9246..7938202 100644 (file)
@@ -24,6 +24,7 @@
 
 static const char pack_usage[] =
   "git pack-objects [{ -q | --progress | --all-progress }]\n"
+  "        [--all-progress-implied]\n"
   "        [--max-pack-size=N] [--local] [--incremental]\n"
   "        [--window=N] [--window-memory=N] [--depth=N]\n"
   "        [--no-reuse-delta] [--no-reuse-object] [--delta-base-offset]\n"
@@ -2122,6 +2123,7 @@ int cmd_pack_objects(int argc, const char **argv, const char *prefix)
 {
        int use_internal_rev_list = 0;
        int thin = 0;
+       int all_progress_implied = 0;
        uint32_t i;
        const char **rp_av;
        int rp_ac_alloc = 64;
@@ -2221,6 +2223,10 @@ int cmd_pack_objects(int argc, const char **argv, const char *prefix)
                        progress = 2;
                        continue;
                }
+               if (!strcmp("--all-progress-implied", arg)) {
+                       all_progress_implied = 1;
+                       continue;
+               }
                if (!strcmp("-q", arg)) {
                        progress = 0;
                        continue;
@@ -2329,6 +2335,9 @@ int cmd_pack_objects(int argc, const char **argv, const char *prefix)
                delta_search_threads = online_cpus();
 #endif
 
+       if (progress && all_progress_implied)
+               progress = 2;
+
        prepare_packed_git();
 
        if (progress)