about summary refs log tree commit homepage
path: root/lib/PublicInbox/Inbox.pm
diff options
context:
space:
mode:
authorEric Wong <e@80x24.org>2016-06-26 23:41:00 +0000
committerEric Wong <e@80x24.org>2016-06-26 23:41:00 +0000
commit62e690b87d03ab1fa1829f99e37c63707c64a5c4 (patch)
treed5797b055cf6b3ee27bebc9da6db806468d39025 /lib/PublicInbox/Inbox.pm
parent31a6ff1221fe70f309ac2476024ebb7953a4e477 (diff)
downloadpublic-inbox-62e690b87d03ab1fa1829f99e37c63707c64a5c4.tar.gz
Oops, I guess I'm trigger-happy today.

Fixes: 31a6ff1221fe ("inbox: ensure we do not show leading "From " lines")
Diffstat (limited to 'lib/PublicInbox/Inbox.pm')
-rw-r--r--lib/PublicInbox/Inbox.pm2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/PublicInbox/Inbox.pm b/lib/PublicInbox/Inbox.pm
index 87c2c9fc..ada713c7 100644
--- a/lib/PublicInbox/Inbox.pm
+++ b/lib/PublicInbox/Inbox.pm
@@ -100,7 +100,7 @@ sub msg_by_path ($$;$) {
         my ($self, $path, $ref) = @_;
         # TODO: allow other refs:
         my $str = git($self)->cat_file('HEAD:'.$path, $ref);
-        $$str =~ s/\A[\r\n]*From [^\r\n]*\r?\n//s;
+        $$str =~ s/\A[\r\n]*From [^\r\n]*\r?\n//s if $str;
         $str;
 }