summaryrefslogtreecommitdiff
path: root/builtin/gc.c
diff options
context:
space:
mode:
authorJeff King <peff@peff.net>2011-11-08 05:34:08 (GMT)
committerJunio C Hamano <gitster@pobox.com>2011-11-08 06:12:19 (GMT)
commitbf0a59b3872211eaa6d4cebb23ae110522458625 (patch)
tree014fea652ee94be204801857c3fc773b6762354b /builtin/gc.c
parentdc347195ccfbc87b6e445f5c31a5500e1df6c9b5 (diff)
downloadgit-bf0a59b3872211eaa6d4cebb23ae110522458625.zip
git-bf0a59b3872211eaa6d4cebb23ae110522458625.tar.gz
git-bf0a59b3872211eaa6d4cebb23ae110522458625.tar.bz2
prune: handle --progress/no-progress
And have "git gc" pass no-progress when quiet. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin/gc.c')
-rw-r--r--builtin/gc.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/builtin/gc.c b/builtin/gc.c
index 0498094..271376d 100644
--- a/builtin/gc.c
+++ b/builtin/gc.c
@@ -32,7 +32,7 @@ static const char *prune_expire = "2.weeks.ago";
static const char *argv_pack_refs[] = {"pack-refs", "--all", "--prune", NULL};
static const char *argv_reflog[] = {"reflog", "expire", "--all", NULL};
static const char *argv_repack[MAX_ADD] = {"repack", "-d", "-l", NULL};
-static const char *argv_prune[] = {"prune", "--expire", NULL, NULL};
+static const char *argv_prune[] = {"prune", "--expire", NULL, NULL, NULL};
static const char *argv_rerere[] = {"rerere", "gc", NULL};
static int gc_config(const char *var, const char *value, void *cb)
@@ -243,6 +243,8 @@ int cmd_gc(int argc, const char **argv, const char *prefix)
if (prune_expire) {
argv_prune[2] = prune_expire;
+ if (quiet)
+ argv_prune[3] = "--no-progress";
if (run_command_v_opt(argv_prune, RUN_GIT_CMD))
return error(FAILED_RUN, argv_prune[0]);
}