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

Re: [RFC] Universal progress option (was Re: [PATCH] clone: use --quiet when stderr is not a terminal)

From
Junio C Hamano <gitster@pobox.com>
Date
Mar 15, 2020, 19:39 UTC
Message-ID
<xmqqk13l9zmf.fsf@gitster.c.googlers.com>
In-Reply-To
<310a176a-1b30-a479-638e-33a51fb2c896@gmail.com>
Derrick Stolee <stolee@gmail.com> writes:
> 2. Update Git's option-parsing to check for --[no-]progress in
>    every builtin (before the builtins do their own parsing).
    git $frotz -e --no-progress other options

Now, without knowing what exactly $frotz is and how it handles its command line options, you cannot tell if you should unset the global "progress" variable. It could be that "-e" is an option that takes one argument (e.g. "git grep -e") in which case, you should not touch the global, or that "-e" is an explicit request to invoke an editor by countermanding anything in the environment or config (e.g. "git merge -e"), in which case you found "--no-progress" that affects the global.

If the parser that kicks in before the commands do their own parsing needs to know that much to correctly understand "--progress" anyway, wouldn't the same amount of effort would allow us to teach these individual commands to understand "--progress" and pass it correctly down to the underlying helpers?

So, "git clone --no-progress" that lets checkout progress may be a bug worth fixing, but I do not think a global switch is a good way forward.

Thanks.
Previous: Derrick StoleeNext: Junio C Hamano
Message 6 of 8 in “clone: use --quiet when stderr is not a terminal”
  1. clone: use --quiet when stderr is not a terminalDerrick Stolee via GitGitGadget, Mar 13, 2020
  2. Elijah NewrenMar 14, 2020
  3. Junio C HamanoMar 14, 2020
  4. Derrick StoleeMar 15, 2020
  5. [RFC] Universal progress option (was Re: [PATCH] clone: use --quiet when stderr is not a terminal)Derrick Stolee, Mar 15, 2020
  6. Junio C HamanoMar 15, 2020
  7. Junio C HamanoMar 15, 2020
  8. Derrick StoleeMar 16, 2020

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.