1. Stefan Saasen
  2. git


Jeff King  committed 1ddf5ef

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>

  • Participants
  • Parent commits aa8dc96
  • Branches master

Comments (0)

Files changed (1)

File builtin-prune-packed.c

View file
  • Ignore whitespace
 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),