about summary refs log tree commit homepage
path: root/lib/PublicInbox
diff options
context:
space:
mode:
Diffstat (limited to 'lib/PublicInbox')
-rw-r--r--lib/PublicInbox/Import.pm2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/PublicInbox/Import.pm b/lib/PublicInbox/Import.pm
index 250a2db3..f320c58c 100644
--- a/lib/PublicInbox/Import.pm
+++ b/lib/PublicInbox/Import.pm
@@ -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",