From: "Dmitry V. Levin" <ldv@altlinux.org>
To: Junio C Hamano <gitster@pobox.com>
Cc: Git Mailing List <git@vger.kernel.org>
Subject: Re: [PATCH] xdiff-interface.c (buffer_is_binary): Remove buffer size limitation
Date: Tue, 4 Dec 2007 00:50:07 +0300 [thread overview]
Message-ID: <20071203215007.GA14697@basalt.office.altlinux.org> (raw)
In-Reply-To: <7vlk8e42qb.fsf@gitster.siamese.dyndns.org>
[-- Attachment #1.1: Type: text/plain, Size: 986 bytes --]
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.
Well, I prefer slightly penalized but working properly git-rebase.
Attached test case demonstrates how current git-rebase can just run
successfully but produce a wrong result.
P.S. The real life example where you can hit this git-rebase problem is
GNU .info files.
--
ldv
[-- Attachment #1.2: t3408-rebase-binary-correctness.sh --]
[-- Type: application/x-sh, Size: 506 bytes --]
[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]
next prev parent reply other threads:[~2007-12-03 21:50 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-12-01 16:01 [PATCH] xdiff-interface.c (buffer_is_binary): Remove buffer size limitation Dmitry V. Levin
2007-12-01 19:46 ` Junio C Hamano
2007-12-03 21:50 ` Dmitry V. Levin [this message]
2007-12-03 23:24 ` Junio C Hamano
2007-12-04 0:00 ` Linus Torvalds
2007-12-04 1:00 ` Johannes Schindelin
2007-12-05 10:47 ` David Kastrup
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20071203215007.GA14697@basalt.office.altlinux.org \
--to=ldv@altlinux.org \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).