]> Sergey Matveev's repositories - public-inbox.git/commitdiff
extmsg: fixup comparison for unknown message types
authorEric Wong <e@80x24.org>
Fri, 25 Dec 2015 10:53:15 +0000 (10:53 +0000)
committerEric Wong <e@80x24.org>
Fri, 25 Dec 2015 10:53:15 +0000 (10:53 +0000)
Fixes commit 4c2c2325d2948ec5340e2fcafbee798cf568f5fd
("rename 'GitCatFile' package to 'Git'")

lib/PublicInbox/ExtMsg.pm

index 0b667545a6e06e29744e6efec151d783510405be..59bbae595e3b1b214a507ac58a9da6213875c31f 100644 (file)
@@ -75,7 +75,7 @@ sub ext_msg {
                # TODO: reuse existing PublicInbox::Git objects to save forks
                my $git = PublicInbox::Git->new($n->{git_dir});
                my (undef, $type, undef) = $git->check($path);
-               return r302($n->{url}, $mid) if ($type eq 'blob');
+               return r302($n->{url}, $mid) if ($type && $type eq 'blob');
        }
 
        # fall back to partial MID matching