From: Jeff King Date: Tue, 24 Nov 2009 03:07:42 +0000 (-0500) Subject: prune-packed: only show progress when stderr is a tty X-Git-Tag: v1.6.6-rc1~4^2~6 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=1ddf5efc66d92282e3c654ebf263538a0df2ac24;p=git.git 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 --- diff --git a/builtin-prune-packed.c b/builtin-prune-packed.c index be99eb0ac..f9463deec 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),