Thread (10 messages) 10 messages, 4 authors, 2016-06-15

Re: [PATCH] progress: use \r as EOL only if isatty(stderr) is true

flat view

From: Junio C Hamano <hidden>
Date: 2016-06-15 22:51:31

Possibly related (same subject, not in this thread)

Steffen Daode Nurpmeso [off-list ref] writes:
So far progress always uses \r to produce one-line output on stderr.
This only produces useful and easy parsable output if stderr is opened
on a file which does interpret CR as a real carriage return operation.
This patch changes EOL to the plain newline \n control if isatty() is
false instead.

Signed-off-by: Steffen Daode Nurpmeso <redacted>
I kind of like this patch, in the sense that if there is a sane scenario
to emit progress to non-tty, we should do just LF not CRLF, but I would
like to know the real motivation behind this proposal.

I thought that we try to disable the progress pretty much everywhere when
we are not talking to a tty, so ugliness coming from many CRLF appearing
in the cron e-mail shouldn't be the issue.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help