Skip to content

Commit 1ddf5ef

Browse files
peffgitster
authored andcommitted
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 <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent aa8dc96 commit 1ddf5ef

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

builtin-prune-packed.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ void prune_packed_objects(int opts)
7171

7272
int cmd_prune_packed(int argc, const char **argv, const char *prefix)
7373
{
74-
int opts = VERBOSE;
74+
int opts = isatty(2) ? VERBOSE : 0;
7575
const struct option prune_packed_options[] = {
7676
OPT_BIT('n', "dry-run", &opts, "dry run", DRY_RUN),
7777
OPT_NEGBIT('q', "quiet", &opts, "be quiet", VERBOSE),

0 commit comments

Comments
 (0)