]> Sergey Matveev's repositories - public-inbox.git/blobdiff - lib/PublicInbox/Import.pm
Import: Don't copy nulls from emails into git
[public-inbox.git] / lib / PublicInbox / Import.pm
index 250a2db31e979054c94df5a0e1dd6ca2d8a5f883..f320c58c6b575023ec94dfcd12e8cbd6910f7af4 100644 (file)
@@ -405,6 +405,8 @@ sub add {
                print $w "reset $ref\n" or wfail;
        }
 
+       # Mime decoding can create nulls replace them with spaces to protect git
+       $subject =~ tr/\0/ /;
        utf8::encode($subject);
        print $w "commit $ref\nmark :$commit\n",
                "author $name <$email> $author_time_raw\n",