scalar: show progress if stderr refers to a terminal
commit4433bd24e4acd015af9d05832c65bd6e3b097df2
authorZheNing Hu <adlternative@gmail.com>
Wed, 11 Jan 2023 13:14:20 +0000 (11 13:14 +0000)
committerJunio C Hamano <gitster@pobox.com>
Mon, 16 Jan 2023 18:42:22 +0000 (16 10:42 -0800)
treee20d02671da522df057a3b5907edbff35bdb5294
parentc48035d29b4e524aed3a32f0403676f0d9128863
scalar: show progress if stderr refers to a terminal

Sometimes when users use scalar to download a monorepo with a long
commit history, they want to check the progress bar to know how long
they still need to wait during the fetch process, but scalar
suppresses this output by default.

So let's check whether scalar stderr refer to a terminal, if so,
show progress, otherwise disable it.

Signed-off-by: ZheNing Hu <adlternative@gmail.com>
Acked-by: Derrick Stolee <derrickstolee@github.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
scalar.c
t/t9211-scalar-clone.sh