about summary refs log tree commit homepage
path: root/lib
diff options
context:
space:
mode:
authorEric Wong <e@80x24.org>2016-04-11 04:44:53 +0000
committerEric Wong <e@80x24.org>2016-04-11 04:57:53 +0000
commit4284a260374b0c6d90a3f95b387b82a6f64f3125 (patch)
tree87defcab169fa2893784605acd26283a327cc27d /lib
parent072a8bf4bc83f1e7b7b6f603ef0403a78ce991d1 (diff)
downloadpublic-inbox-4284a260374b0c6d90a3f95b387b82a6f64f3125.tar.gz
git is byte-oriented and fast-import will not tolerate
miscalculations.  This is necessary for wide characters
in commit messages (email Subjects).
Diffstat (limited to 'lib')
-rw-r--r--lib/PublicInbox/Import.pm2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/PublicInbox/Import.pm b/lib/PublicInbox/Import.pm
index 4c7bbf14..5bae69df 100644
--- a/lib/PublicInbox/Import.pm
+++ b/lib/PublicInbox/Import.pm
@@ -168,7 +168,7 @@ sub add {
         print $w "commit $ref\nmark :$commit\n",
                 "author $name <$email> $date\n",
                 "committer $self->{ident} ", now2822(), "\n",
-                "data ", (length($subject) + 1), "\n",
+                "data ", (bytes::length($subject) + 1), "\n",
                 $subject, "\n\n" or wfail;
         binmode $w, ':raw' or die "binmode :raw failed: $!";