$str;
}
+sub msg_by_smsg ($$;$) {
+ my ($self, $smsg, $ref) = @_;
+
+ # backwards compat to fallback to msg_by_mid
+ # TODO: remove if we bump SCHEMA_VERSION in Search.pm:
+ defined(my $blob = $smsg->blob) or return msg_by_mid($self, $smsg->mid);
+
+ my $str = git($self)->cat_file($blob, $ref);
+ $$str =~ s/\A[\r\n]*From [^\r\n]*\r?\n//s if $str;
+ $str;
+}
+
sub path_check {
my ($self, $path) = @_;
git($self)->check('HEAD:'.$path);