Re: [PATCH] rev-list: handle %x00 NUL in user format
- From
Jeff King <peff@peff.net>
- Date
- Oct 14, 2010, 00:38 UTC
- Message-ID
- <20101014003853.GA10708@coredump.intra.peff.net>
- In-Reply-To
- <7vtykpiwkv.fsf@alter.siamese.dyndns.org>
On Wed, Oct 13, 2010 at 02:58:40PM -0700, Junio C Hamano wrote:
Show 17 quoted lines
> Jeff King <peff@peff.net> writes: > > > Erik mentioned a potential problem with fwrite() and the way we handle > > ANSI emulation for Windows. I think if there is a problem, then the same > > problem exists in the --graph code, and we should do this, and then fix > > both on top. > > I am quite sure that --graph codepath is used a lot less often than this > codepath, and most users do not hit the problem you are fixing---that is > why it took so long to get noticed. I think this printf() has been there > from the beginning, even though the possibility of placing a NUL in > buf.buf may have come much later, like when %x00 was introduced). > > Use of fwrite() here will affect all Windows users who use color (probably > most of them), no? It may be a deliberate regression, but it has a real > cost associated with it; it will break more usual uses on Windows to help > an obscure use case on POSIX.
Yeah, I don't want to regress Windows users in an actual release. I was hoping for you to queue it on a side branch, and then have Windows people apply the proper fix on top before getting it merged in.
-Peff