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

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

From
Junio C Hamano <gitster@pobox.com>
Date
Oct 31, 2015, 17:37 UTC
Message-ID
<xmqqk2q3hrbl.fsf@gitster.mtv.corp.google.com>
In-Reply-To
<CAOc6etYCzBYpf+7p8p3=zQun7bYXYVc-codoUf5Abcq+hAz8cA@mail.gmail.com>
Edmundo Carmona Antoranz <eantoranz@gmail.com> writes:
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 do find what Peff showed us a lot easier to follow.
	if (opts.show_progress < 0) {
		if (opts.quiet)
			opts.show_progress = 0;
		else
			opts.show_progress = isatty(2);
	}
Previous: Edmundo Carmona AntoranzNext: Edmundo Carmona Antoranz
Message 11 of 16 in “checkout: add --progress option”
  1. checkout: add --progress optionEdmundo Carmona Antoranz, Oct 30, 2015
  2. Junio C HamanoOct 30, 2015
  3. Eric SunshineOct 30, 2015
  4. Junio C HamanoOct 30, 2015
  5. Eric SunshineOct 30, 2015
  6. Jeff KingOct 30, 2015
  7. Junio C HamanoOct 30, 2015
  8. Edmundo Carmona AntoranzOct 31, 2015
  9. Edmundo Carmona AntoranzOct 31, 2015
  10. Edmundo Carmona AntoranzOct 31, 2015
  11. Junio C HamanoOct 31, 2015
  12. Edmundo Carmona AntoranzOct 31, 2015
  13. Edmundo Carmona AntoranzOct 31, 2015
  14. Jeff KingOct 31, 2015
  15. Eric SunshineNov 1, 2015
  16. 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.