git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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

From
Eric Sunshine <sunshine@sunshineco.com>
Date
Nov 1, 2015, 19:13 UTC
Message-ID
<CAPig+cTE=vhFf-wf9qd4EMt8agi5SneQ3efKi1DCrArEsii5GA@mail.gmail.com>
In-Reply-To
<1446401039-13848-1-git-send-email-eantoranz@gmail.com>

On Sun, Nov 1, 2015 at 1:03 PM, Edmundo Carmona Antoranz <eantoranz@gmail.com> wrote:

Show 25 quoted lines
> 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@gmail.com>
> ---
> +       /*
> +        * 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
Previous: Edmundo Carmona AntoranzNext: Edmundo Carmona Antoranz
Message 2 of 3 in “checkout: add --progress option”
  1. checkout: add --progress optionEdmundo Carmona Antoranz, Nov 1, 2015
  2. Eric SunshineNov 1, 2015
  3. Edmundo Carmona AntoranzNov 1, 2015

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.