Re: [PATCH] checkout: add --progress option
- From
Edmundo Carmona Antoranz <eantoranz@gmail.com>
- Date
- Oct 31, 2015, 01:08 UTC
- Message-ID
- <CAOc6etZ+MeSuVDF6W4pefsxDDee3Dx3DikGxNA_X8-Qh3R9ZQQ@mail.gmail.com>
- In-Reply-To
- <CAOc6etYiqH8bvnCD_9hedzDW6fhknXLGesM6dX7S9DBB_r-9zA@mail.gmail.com>
One line got wrapped around, hope that's not a problem to understand the whole concept.
Show 12 quoted lines
> +/*
> + * Any of these conditions will make progress output be skipped:
> + * - selected --quiet
> + * - selected --no-progress
> + * - (didn't select --progress nor --no-progress) and not working on a terminal
> + */
> +static int verbose_update(const struct checkout_opts *o)
> +{
> + return !o->quiet && o->show_progress && (o->show_progress >= 0
> || isatty(2));
> +}
> +