about summary refs log tree commit homepage
path: root/lib/PublicInbox/ViewDiff.pm
diff options
context:
space:
mode:
Diffstat (limited to 'lib/PublicInbox/ViewDiff.pm')
-rw-r--r--lib/PublicInbox/ViewDiff.pm10
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/PublicInbox/ViewDiff.pm b/lib/PublicInbox/ViewDiff.pm
index d078c5f9..7a6d9a2b 100644
--- a/lib/PublicInbox/ViewDiff.pm
+++ b/lib/PublicInbox/ViewDiff.pm
@@ -135,15 +135,14 @@ sub diff_header ($$$) {
         # no need to capture oid_a and oid_b on add/delete,
         # we just linkify OIDs directly via s///e in conditional
         if ($$x =~ s/$NULL_TO_BLOB/$1 . oid($dctx, $spfx, $2)/e) {
-                push @{$ctx->{-qry}->{dfpost}}, $2;
+                push @{$ctx->{-qry_dfblob}}, $2;
         } elsif ($$x =~ s/$BLOB_TO_NULL/'index '.oid($dctx, $spfx, $1).$2/e) {
-                push @{$ctx->{-qry}->{dfpre}}, $1;
+                push @{$ctx->{-qry_dfblob}}, $1;
         } elsif ($$x =~ $BLOB_TO_BLOB) {
                 # modification-only, not add/delete:
                 # linkify hunk headers later using oid_a and oid_b
                 @$dctx{qw(oid_a oid_b)} = ($1, $2);
-                push @{$ctx->{-qry}->{dfpre}}, $1;
-                push @{$ctx->{-qry}->{dfpost}}, $2;
+                push @{$ctx->{-qry_dfblob}}, $1, $2;
         } else {
                 warn "BUG? <$$x> had no ^index line";
         }
@@ -183,9 +182,10 @@ sub diff_before_or_after ($$) {
 sub flush_diff ($$) {
         my ($ctx, $cur) = @_;
 
+        my ($subj) = ($$cur =~ /^Subject:\s*\[[^\]]+\]\s*(.+?)$/sm);
         my @top = split($EXTRACT_DIFFS, $$cur);
         undef $$cur; # free memory
-
+        $ctx->{-qry_subj} = $subj if $subj;
         my $lnk = $ctx->{-linkify};
         my $dctx; # {}, keys: Q, oid_a, oid_b
         my $zfh = $ctx->zfh;