" <a\nhref=\"${mhref}raw\">raw</a>" .
" <a\nhref=\"${mhref}#R\">reply</a>";
- delete($ctx->{-qry}) and
+ # points to permalink
+ delete($ctx->{-qry_dfblob}) and
$rv .= qq[ <a\nhref="${mhref}#related">related</a>];
my $hr;
my $upfx = '../';
my (@related, @skel);
my $foot = '<pre>';
- my $qry = delete $ctx->{-qry};
- if ($qry && $ctx->{ibx}->isrch) {
+ my $qry_dfblob = delete $ctx->{-qry_dfblob};
+ if ($qry_dfblob && $ctx->{ibx}->isrch) {
my $q = ''; # search for either ancestor or descendent patches
- for (@{$qry->{dfpre}}, @{$qry->{dfpost}}) {
+ for (@$qry_dfblob) {
chop if length > 7; # include 1 abbrev "older" patches
$q .= "dfblob:$_ ";
}
# 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";
}
# TODO: should there be another textarea which attempts to
# search for the exact email which was applied to make this
# commit?
- if (my $qry = delete $ctx->{-qry}) {
+ if (my $qry_dfblob = delete $ctx->{-qry_dfblob}) {
my $q = '';
- for (@{$qry->{dfpost}}, @{$qry->{dfpre}}) {
+ for (@$qry_dfblob) {
# keep blobs as short as reasonable, emails
# are going to be older than what's in git
substr($_, 7, 64, '');