Apparently, --subject doesn't work[1] with "git send-email" in
this context. So drop the CLI arg and add a note to tell the
user to set a "Subject:" line in their response body, instead.
[1] I'm not sure if --subject ever worked as I thought it would,
or if it's a regression. In either case, there are current
versions of git where it doesn't, so just tell users to use
the currently supported method.
Link: https://80x24.org/lore/git/CAC4O8c-Tf11CpwuRudyrpXv5bGshuyEenV9kKrs0zRWER-+yHA@mail.gmail.com/
my $obfs = $ibx->{obfuscate};
my $subj = $hdr->header('Subject') || '';
$subj = "Re: $subj" unless $subj =~ /\bRe:/i;
my $obfs = $ibx->{obfuscate};
my $subj = $hdr->header('Subject') || '';
$subj = "Re: $subj" unless $subj =~ /\bRe:/i;
my $mid = $hdr->header_raw('Message-ID');
push @arg, '--in-reply-to='.squote_maybe(mid_clean($mid));
my $irt = mid_href($mid);
my $mid = $hdr->header_raw('Message-ID');
push @arg, '--in-reply-to='.squote_maybe(mid_clean($mid));
my $irt = mid_href($mid);
- push @arg, "--subject=".squote_maybe($subj_raw);
-
# I'm not sure if address obfuscation and mailto: links can
# be made compatible; and address obfuscation is misguided,
# anyways.
# I'm not sure if address obfuscation and mailto: links can
# be made compatible; and address obfuscation is misguided,
# anyways.
<a
href="$se_url">$se_url</a>
$link</pre>
<a
href="$se_url">$se_url</a>
$link</pre>
+
+ Be sure your reply has a <b>Subject:</b> header at the top and a blank line
+ before the message body.
'--to=from@example.com',
'--cc=cc@example.com',
'--cc=to@example.com',
'--to=from@example.com',
'--cc=cc@example.com',
'--cc=to@example.com',
];
is_deeply($arg, $exp, 'default reply is to :all');
];
is_deeply($arg, $exp, 'default reply is to :all');
($arg, $link) = PublicInbox::Reply::mailto_arg_link($ibx, $hdr);
is_deeply($arg, $exp, '":all" also works');
($arg, $link) = PublicInbox::Reply::mailto_arg_link($ibx, $hdr);
is_deeply($arg, $exp, '":all" also works');
-$exp = [ '--in-reply-to=blah@example.com', '--to=primary@example.com',
- "--subject='Re: hihi'" ];
+$exp = [ '--in-reply-to=blah@example.com', '--to=primary@example.com' ];
$ibx->{replyto} = ':list';
($arg, $link) = PublicInbox::Reply::mailto_arg_link($ibx, $hdr);
is_deeply($arg, $exp, '":list" works for centralized lists');
$ibx->{replyto} = ':list';
($arg, $link) = PublicInbox::Reply::mailto_arg_link($ibx, $hdr);
is_deeply($arg, $exp, '":list" works for centralized lists');
'--to=primary@example.com',
'--cc=cc@example.com',
'--cc=to@example.com',
'--to=primary@example.com',
'--cc=cc@example.com',
'--cc=to@example.com',
];
$ibx->{replyto} = ':list,Cc,To';
($arg, $link) = PublicInbox::Reply::mailto_arg_link($ibx, $hdr);
];
$ibx->{replyto} = ':list,Cc,To';
($arg, $link) = PublicInbox::Reply::mailto_arg_link($ibx, $hdr);
$ibx->{replyto} = 'new@example.com';
($arg, $link) = PublicInbox::Reply::mailto_arg_link($ibx, $hdr);
$ibx->{replyto} = 'new@example.com';
($arg, $link) = PublicInbox::Reply::mailto_arg_link($ibx, $hdr);
-$exp = [ '--in-reply-to=blah@example.com', '--to=new@example.com',
- "--subject='Re: hihi'"
-];
+$exp = [ '--in-reply-to=blah@example.com', '--to=new@example.com' ];
is_deeply($arg, $exp, 'explicit address works, too');
$ibx->{replyto} = ':all';
is_deeply($arg, $exp, 'explicit address works, too');
$ibx->{replyto} = ':all';
'--to=from@example$(echo .)com',
'--cc=cc@example$(echo .)com',
'--cc=to@example$(echo .)com',
'--to=from@example$(echo .)com',
'--cc=cc@example$(echo .)com',
'--cc=to@example$(echo .)com',
];
is_deeply($arg, $exp, 'address obfuscation works');
is($link, '', 'no mailto: link given');
];
is_deeply($arg, $exp, 'address obfuscation works');
is($link, '', 'no mailto: link given');