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

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

 



On Sun, Nov 1, 2015 at 1:03 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>
> ---
> +       /*
> +        * Final processing of show_progress
> +        * - User selected --progress: show progress
> +        * - user selected --no-progress: skip progress
> +        * - User didn't specify:
> +        *     (check rules in order till finding the first matching one)
> +        *     - user selected --quiet: skip progress
> +        *     - stderr is connected to a terminal: show progress
> +        *     - fallback: skip progress
> +        */
> +       if (opts.show_progress < 0) {
> +               /* user didn't specify --[no-]progress */
> +               if (opts.quiet)
> +                       opts.show_progress = 0;
> +               else
> +                       opts.show_progress = isatty(2);
> +       }

Style-wise this looks better.

I'll assume that you simply overlooked the remainder of my v4 review
comments, so I'll merely provide a reference to them[1] rather than
repeating myself. If that assumption is incorrect, please do have the
courtesy to state that you disagree with review comments and to
explain your position, otherwise reviewers will feel that their
efforts are wasted.

Thanks.

[1]: http://article.gmane.org/gmane.comp.version-control.git/280641
--
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]