]> Sergey Matveev's repositories - public-inbox.git/blobdiff - lib/PublicInbox/Search.pm
spawn_pp: use `which()' properly for pure-Perl spawn
[public-inbox.git] / lib / PublicInbox / Search.pm
index 6f9fdde1bc2276cbc0620c794731f179a00750b1..2feb3e13b49d222bc7bd28430a9cf159692a933f 100644 (file)
@@ -179,6 +179,7 @@ EOF
        'dfpre:' => 'match pre-image git blob ID',
        'dfpost:' => 'match post-image git blob ID',
        'dfblob:' => 'match either pre or post-image git blob ID',
+       'patchid:' => "match `git patch-id --stable' output",
        'rt:' => <<EOF,
 match received time, like `d:' if sender's clock was correct
 EOF
@@ -542,9 +543,10 @@ sub help {
        \@ret;
 }
 
+# always returns a scalar value
 sub int_val ($$) {
        my ($doc, $col) = @_;
-       my $val = $doc->get_value($col) or return; # undefined is '' in Xapian
+       my $val = $doc->get_value($col) or return undef; # undef is '' in Xapian
        sortable_unserialise($val) + 0; # PV => IV conversion
 }