@matheusbsbs / matheus-bagliano / commits / 1ddf5efc66
Fork 0

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 <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Jeff King committed Nov 23, 2009 at 22:07 UTC 1ddf5efc66d92282e3c654ebf263538a0df2ac24
1 file changed +1 -1
builtin-prune-packed.c
+1 -1
@@ -71,7 +71,7 @@ void prune_packed_objects(int opts)
71
72 int cmd_prune_packed(int argc, const char **argv, const char *prefix)
73 {
74 - int opts = VERBOSE;
74 + int opts = isatty(2) ? VERBOSE : 0;
75 const struct option prune_packed_options[] = {
76 OPT_BIT('n', "dry-run", &opts, "dry run", DRY_RUN),
77 OPT_NEGBIT('q', "quiet", &opts, "be quiet", VERBOSE),