Re: [PATCH] checkout: add --progress option

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Oct 29, 2015 at 9:23 PM, Edmundo Carmona Antoranz
<eantoranz@xxxxxxxxx> wrote:
> Under normal circumstances, and like other git commands,
> git checkout will write progress info to stderr if
> attached to a terminal. This option allows progress
> to be forced even if not using a terminal. Also,
> progress can be skipped if using option --no-progress.
>
> Signed-off-by: Edmundo Carmona Antoranz <eantoranz@xxxxxxxxx>
> ---
> -       opts.verbose_update = !o->quiet && isatty(2);
> +       /**
> +        * Rules to display progress:
> +        * -q is selected
> +        *      no verbiage
> +        * -q is _not_ selected and --no-progress _is_ selected,
> +        *      progress will be skipped
> +        * -q is _not_ selected and --progress _is_ selected,
> +        *      progress will be printed to stderr
> +        * -q is _not_ selected and --progress is 'undefined'
> +        *      progress will be printed to stderr _if_ working on a terminal
> +        */
> +       opts.verbose_update = !o->quiet && (option_progress > 0 ||
> +                                          (option_progress < 0 && isatty(2)));

Does this logic also need to be applied to the other instance where
isatty() is consulted in merge_working_tree()?
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]