From: Junio C Hamano <gitster@pobox.com>
To: "Dmitry V. Levin" <ldv@altlinux.org>
Cc: Git Mailing List <git@vger.kernel.org>
Subject: Re: [PATCH] xdiff-interface.c (buffer_is_binary): Remove buffer size limitation
Date: Sat, 01 Dec 2007 11:46:52 -0800 [thread overview]
Message-ID: <7vlk8e42qb.fsf@gitster.siamese.dyndns.org> (raw)
In-Reply-To: <20071201160113.GA20849@nomad.office.altlinux.org> (Dmitry V. Levin's message of "Sat, 1 Dec 2007 19:01:13 +0300")
"Dmitry V. Levin" <ldv@altlinux.org> writes:
> 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).
Perhaps mailinfo can be updated to handle embedded NUL.
Another alternative (I've been trying to find time to do so for quite a
while now but dealing with list traffic always takes priority on my time
allotment) is to update rebase not to rely on "format-patch piped to
am", and I think that is more correct solution in the longer term.
In the meantime, a workaround would be to use "rebase -i". It uses
cherry-pick machinery instead of "format-patch piped to am", and
hopefully would handle NULs better. It probably is slower than non
interactive one exactly because it uses cherry-pick, and that is the
reason I am first working on updating cherry-pick before actually making
the non-interactive rebase to use it.
next prev parent reply other threads:[~2007-12-01 19:47 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 [this message]
2007-12-03 21:50 ` Dmitry V. Levin
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=7vlk8e42qb.fsf@gitster.siamese.dyndns.org \
--to=gitster@pobox.com \
--cc=git@vger.kernel.org \
--cc=ldv@altlinux.org \
/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).