From: Junio C Hamano Date: Mon, 03 Dec 2007 23:24:44 GMT Subject: Re: [PATCH] xdiff-interface.c (buffer_is_binary): Remove buffer size limitation Message-ID: <7veje3e4zn.fsf@gitster.siamese.dyndns.org> In-Reply-To: <20071203215007.GA14697@basalt.office.altlinux.org> "Dmitry V. Levin" writes: > On Sat, Dec 01, 2007 at 11:46:52AM -0800, Junio C Hamano wrote: >> On Sat, Dec 01, 2007 at 07:01:13PM +0300, Dmitry V. Levin wrote: >> >> > When checking buffer for NUL byte, do not limit size of buffer we check. >> > Otherwise we break git-rebase: git-format-patch may generate output which >> > git-mailinfo cannot handle properly. >> >> I think this is tackling a valid problem but it is a wrong solution. >> The change penalizes text changes which is the majority, just in case >> there is an unusual change that has an embedded NUL far into the file >> (iow, exception). > > Penalizes? > Average file size in the linux-2.6.23.9 kernel tree is 10944 bytes, > FIRST_FEW_BYTES limit is 8000 bytes. I really wish we were living in a simpler time, back when I could just say "we optimize for the kernel" and did not have to be worried about getting laughed at.