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

Re: [PATCH v3] scalar: show progress if stderr refer to a terminal

From
Derrick Stolee <derrickstolee@github.com>
Date
Jan 11, 2023, 14:55 UTC
Message-ID
<9d8e38fd-f001-5aa5-ab78-cc6d314df09a@github.com>
In-Reply-To
<pull.1441.v3.git.1673442860379.gitgitgadget@gmail.com>
On 1/11/2023 8:14 AM, ZheNing Hu via GitGitGadget wrote:
> From: ZheNing Hu <adlternative@gmail.com>
> Range-diff vs v2:
>      -+test_expect_success 'progress without tty' '
>      ++test_expect_success TTY 'progress without tty' '
I think this addition of the TTY prerequisite is not necessary...
Show 11 quoted lines
> +test_expect_success TTY 'progress without tty' '
> +	enlistment=progress2 &&
> +
> +	test_config -C to-clone uploadpack.allowfilter true &&
> +	test_config -C to-clone uploadpack.allowanysha1inwant true &&
> +
> +	GIT_PROGRESS_DELAY=0 scalar clone "file://$(pwd)/to-clone" "$enlistment" 2>stderr &&
> +	! grep "Enumerating objects" stderr &&
> +	! grep "Updating files" stderr &&
> +	cleanup_clone $enlistment
> +'

...because the test doesn't use the environment details for mimicing a TTY. The point is that stderr is redirected to a file and isatty(2) would report false.

I don't think this is worth a re-roll, though, so I'm happy with this version.

Thanks, -Stolee

Previous: ZheNing Hu via GitGitGadgetNext: Junio C Hamano
Message 11 of 12 in “scalar: use verbose mode in clone”
  1. scalar: use verbose mode in cloneZheNing Hu via GitGitGadget, Dec 7, 2022
  2. Taylor BlauDec 7, 2022
  3. ZheNing HuDec 8, 2022
  4. Derrick StoleeDec 8, 2022
  5. ZheNing HuDec 13, 2022
  6. scalar: show progress if stderr refer to a terminalZheNing Hu via GitGitGadget, Dec 25, 2022
  7. Derrick StoleeJan 5, 2023
  8. Junio C HamanoJan 6, 2023
  9. ZheNing HuJan 11, 2023
  10. scalar: show progress if stderr refer to a terminalZheNing Hu via GitGitGadget, Jan 11, 2023
  11. Derrick StoleeJan 11, 2023
  12. Junio C HamanoJan 13, 2023

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.