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

Re: [PATCH] checkout: refactor of --progress option

From
Edmundo Carmona Antoranz <eantoranz@gmail.com>
Date
Oct 31, 2015, 17:10 UTC
Message-ID
<CAOc6etasvk6f0XhJumwXtYiC7h_ufQUAyN1BktQ=qdd4_f0hSQ@mail.gmail.com>
In-Reply-To
<1446310669-9790-1-git-send-email-eantoranz@gmail.com>

On Sat, Oct 31, 2015 at 10:57 AM, Edmundo Carmona Antoranz <eantoranz@gmail.com> wrote:

Show 10 quoted lines
> +       /*
> +        * Final processing of show_progress
> +        * Any of these 3 conditions will make progress output be skipped:
> +        * - selected --quiet
> +        * - selected --no-progress
> +        * - didn't select --progress and not working on a terminal
> +        */
> +       opts.show_progress = !opts.quiet && opts.show_progress &&
> +                            (opts.show_progress > 0 || isatty(2));
> +
I did a very small adjustment there from what I had sent yesterday.
It was (opts.show_progress >= 0 || isatty(2))

It was unnecessary to include the case of a 0 because it was discarded by the second item on the outer short-circuited if: opts_show_progress.

Let me know of your feedback and thanks.
Previous: Edmundo Carmona AntoranzNext: Edmundo Carmona Antoranz
Message 2 of 4 in “checkout: refactor of --progress option”
  1. checkout: refactor of --progress optionEdmundo Carmona Antoranz, Oct 31, 2015
  2. Edmundo Carmona AntoranzOct 31, 2015
  3. Edmundo Carmona AntoranzOct 31, 2015
  4. Edmundo Carmona AntoranzOct 31, 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.