user/dev discussion of public-inbox itself
 help / color / mirror / code / Atom feed
From: ebiederm@xmission.com (Eric W. Biederman)
To: Eric Wong <e@80x24.org>
Cc: meta@public-inbox.org
Subject: Re: [PATCH] Import: Don't copy nulls from emails into git
Date: Sat, 07 Jul 2018 20:52:08 -0500	[thread overview]
Message-ID: <8736wusddj.fsf@xmission.com> (raw)
In-Reply-To: <20180708000716.GA2550@dcvr> (Eric Wong's message of "Sun, 8 Jul 2018 00:07:16 +0000")

Eric Wong <e@80x24.org> writes:

> "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)

Thank you.

I had thought of doing that but I forgot to come back and see if there
were any tweaks like that I needed to do.

Sigh. My perl is currently quite rusty.

Eric


  reply	other threads:[~2018-07-08  1:52 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
2018-07-08  1:52               ` Eric W. Biederman [this message]
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=8736wusddj.fsf@xmission.com \
    --to=ebiederm@xmission.com \
    --cc=e@80x24.org \
    --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.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/public-inbox.git

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).