Skip to content

Commit

Permalink
prune-packed: only show progress when stderr is a tty
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Jeff King authored and Junio C Hamano committed Nov 24, 2009
1 parent aa8dc96 commit 1ddf5ef
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion builtin-prune-packed.c
Original file line number Diff line number Diff line change
Expand Up @@ -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),
Expand Down

0 comments on commit 1ddf5ef

Please sign in to comment.