From 1ddf5efc66d92282e3c654ebf263538a0df2ac24 Mon Sep 17 00:00:00 2001 From: Jeff King Date: Mon, 23 Nov 2009 22:07:42 -0500 Subject: [PATCH] prune-packed: only show progress when stderr is a tty This matches the behavior of other git programs, and helps keep cruft out of things like cron job output. Signed-off-by: Jeff King Signed-off-by: Junio C Hamano --- builtin-prune-packed.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/builtin-prune-packed.c b/builtin-prune-packed.c index be99eb0ac4..f9463deec2 100644 --- a/builtin-prune-packed.c +++ b/builtin-prune-packed.c @@ -71,7 +71,7 @@ void prune_packed_objects(int opts) int cmd_prune_packed(int argc, const char **argv, const char *prefix) { - int opts = VERBOSE; + int opts = isatty(2) ? VERBOSE : 0; const struct option prune_packed_options[] = { OPT_BIT('n', "dry-run", &opts, "dry run", DRY_RUN), OPT_NEGBIT('q', "quiet", &opts, "be quiet", VERBOSE), -- 2.11.4.GIT