Re: [PATCH] progress: use \r as EOL only if isatty(stderr) is true
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Jun 28, 2011, 18:33 UTC
- Message-ID
- <7vwrg5u7oz.fsf@alter.siamese.dyndns.org>
- In-Reply-To
- <1309272009-23076-1-git-send-email-sdaoden@gmail.com>
Steffen Daode Nurpmeso <sdaoden@googlemail.com> writes:
Show 7 quoted lines
> 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 <sdaoden@gmail.com>
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.