From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: AS6315 166.70.0.0/16 X-Spam-Status: No, score=-3.7 required=3.0 tests=AWL,BAYES_00, RCVD_IN_DNSWL_LOW,SPF_PASS shortcircuit=no autolearn=ham autolearn_force=no version=3.4.1 Received: from out03.mta.xmission.com (out03.mta.xmission.com [166.70.13.233]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by dcvr.yhbt.net (Postfix) with ESMTPS id 77D3F1F62D; Sun, 8 Jul 2018 01:52:24 +0000 (UTC) Received: from in02.mta.xmission.com ([166.70.13.52]) by out03.mta.xmission.com with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.87) (envelope-from ) id 1fbysA-0005I0-Uu; Sat, 07 Jul 2018 19:52:22 -0600 Received: from [97.119.167.31] (helo=x220.xmission.com) by in02.mta.xmission.com with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.87) (envelope-from ) id 1fbysA-0000zk-65; Sat, 07 Jul 2018 19:52:22 -0600 From: ebiederm@xmission.com (Eric W. Biederman) To: Eric Wong Cc: meta@public-inbox.org References: <87a7r6z1cy.fsf@xmission.com> <20180705231346.GA6524@dcvr> <87601turnf.fsf@xmission.com> <87o9flt496.fsf@xmission.com> <87efggt5i8.fsf_-_@xmission.com> <20180706222251.GA14747@dcvr> <87d0vysy6z.fsf_-_@xmission.com> <20180708000716.GA2550@dcvr> Date: Sat, 07 Jul 2018 20:52:08 -0500 In-Reply-To: <20180708000716.GA2550@dcvr> (Eric Wong's message of "Sun, 8 Jul 2018 00:07:16 +0000") Message-ID: <8736wusddj.fsf@xmission.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-XM-SPF: eid=1fbysA-0000zk-65;;;mid=<8736wusddj.fsf@xmission.com>;;;hst=in02.mta.xmission.com;;;ip=97.119.167.31;;;frm=ebiederm@xmission.com;;;spf=neutral X-XM-AID: U2FsdGVkX19TF1cQj8IrM2Yu2wiInL2GFbewGLJbweg= X-SA-Exim-Connect-IP: 97.119.167.31 X-SA-Exim-Mail-From: ebiederm@xmission.com Subject: Re: [PATCH] Import: Don't copy nulls from emails into git X-SA-Exim-Version: 4.2.1 (built Thu, 05 May 2016 13:38:54 -0600) X-SA-Exim-Scanned: Yes (on in02.mta.xmission.com) List-Id: Eric Wong writes: > "Eric W. Biederman" 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