From: Eric Wong <e@80x24.org>
To: "Eric W. Biederman" <ebiederm@xmission.com>
Cc: meta@public-inbox.org
Subject: Re: [PATCH] Import: Don't copy nulls from emails into git
Date: Sun, 8 Jul 2018 00:07:16 +0000 [thread overview]
Message-ID: <20180708000716.GA2550@dcvr> (raw)
In-Reply-To: <87d0vysy6z.fsf_-_@xmission.com>
"Eric W. Biederman" <ebiederm@xmission.com> wrote:
>
> Recently I ran git --git-dir=lkml/git/1.git fsck
> and it reported:
> > warning in commit 299dbd50b6995c6debe2275f0df984ce697fb4cc: nulInCommit: NULL byte inthe commit object body
>
> Which I found quite scary. Nulls in the wrong place have a bad tendency
> to make programs misbehave.
Thanks. In this case, it's a bit weird for fast-import to
accept this...
> + # Mime decoding can create nulls replace them with spaces to protect git
> + $subject =~ s/\0/ /;
\0 could appear more than once, so it needs a 'g', at least.
I squashed in a change to use "tr/\0/ /" instead
(tr// should be faster)
next prev parent reply other threads:[~2018-07-08 0:07 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-07-05 5:40 Warnings from git fsck after lkml import Eric W. Biederman
2018-07-05 23:13 ` Eric Wong
2018-07-06 0:36 ` Eric W. Biederman
2018-07-06 3:47 ` Eric W. Biederman
2018-07-06 21:32 ` [PATCH] MsgTime.pm: Use strptime to compute the time zone Eric W. Biederman
2018-07-06 22:22 ` Eric Wong
2018-07-07 18:18 ` Eric W. Biederman
2018-07-07 18:22 ` [PATCH] Import: Don't copy nulls from emails into git Eric W. Biederman
2018-07-08 0:07 ` Eric Wong [this message]
2018-07-08 1:52 ` Eric W. Biederman
2018-07-12 18:31 ` Warnings from git fsck after lkml import Konstantin Ryabitsev
2018-07-12 22:19 ` Eric W. Biederman
2018-07-12 22:29 ` Eric Wong
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
List information: https://public-inbox.org/README
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20180708000716.GA2550@dcvr \
--to=e@80x24.org \
--cc=ebiederm@xmission.com \
--cc=meta@public-inbox.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 read-only IMAP folder(s) and NNTP newsgroup(s).