From: Junio C Hamano <gitster@pobox.com>
To: "Carlo Marcelo Arenas Belón" <carenas@gmail.com>
Cc: Drew DeVault <sir@cmpwn.com>, git@vger.kernel.org
Subject: Re: [PATCH] send-email: do not prompt for In-Reply-To
Date: Thu, 27 Aug 2020 12:34:02 -0700 [thread overview]
Message-ID: <xmqqtuwnq3x1.fsf@gitster.c.googlers.com> (raw)
In-Reply-To: <20200827192029.GA63138@Carlos-MBP> ("Carlo Marcelo Arenas =?utf-8?Q?Bel=C3=B3n=22's?= message of "Thu, 27 Aug 2020 12:20:29 -0700")
Carlo Marcelo Arenas Belón <carenas@gmail.com> writes:
> On Thu, Aug 27, 2020 at 03:14:57PM -0400, Drew DeVault wrote:
>> Do you have sendemail.to set in your local git config?
>
> I do and can't reproduce either; which version of git do you have this
> problem with?
Any recent version of git-send-email, I would say. The relevant
code snippets are:
my $prompting = 0;
if (!@initial_to && !defined $to_cmd) {
my $to = ask("$to_whom ",
default => "",
valid_re => qr/\@.*\./, confirm_only => 1);
push @initial_to, parse_address_line($to) if defined $to; #
$prompting++;
}
...
@initial_to = process_address_list(@initial_to);
@initial_cc = process_address_list(@initial_cc);
@initial_bcc = process_address_list(@initial_bcc);
if ($thread && !defined $initial_in_reply_to && $prompting) {
$initial_in_reply_to = ask(
__("Message-ID to be used as In-Reply-To for the first email (if any)? "),
default => "",
valid_re => qr/\@.*\./, confirm_only => 1);
}
where initial_to is set either from the command line or sendemail.to
configuration variable and before the control reaches this section
of the code. In addition to realizing "ah, To: address is not given
so we need to ask" and ask the to address, it says "since we have
already interatively asked the end-user anyway, we can and should
ask other things as well" by incrementing $prompting.
That feels both understandable and bogus at the same time. To:
is pretty much required (yes, you can use cc: and bcc: without any
address on To:, but that is not something you'd usually do to send
patches to mailing lists), so lack of it means either asking
interactively or aborting. But other things like in-reply-to are
optional, and tying the decision to prompt for them or not does not
feel OK.
next prev parent reply other threads:[~2020-08-27 19:34 UTC|newest]
Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-08-27 17:55 [PATCH] send-email: do not prompt for In-Reply-To Drew DeVault
2020-08-27 19:04 ` Junio C Hamano
2020-08-27 19:08 ` Junio C Hamano
2020-08-27 19:14 ` Drew DeVault
2020-08-27 19:20 ` Carlo Marcelo Arenas Belón
2020-08-27 19:23 ` Drew DeVault
2020-08-27 19:32 ` Carlo Marcelo Arenas Belón
2020-08-27 19:34 ` Junio C Hamano [this message]
2020-08-27 19:34 ` Drew DeVault
2020-08-27 19:46 ` Carlo Arenas
2020-08-27 22:02 ` Carlo Marcelo Arenas Belón
2020-08-27 22:57 ` Junio C Hamano
2020-08-27 22:59 ` Drew DeVault
2020-08-27 23:05 ` Drew DeVault
2020-08-28 1:02 ` Junio C Hamano
2020-08-28 1:10 ` Drew DeVault
2020-08-28 1:44 ` Raymond E. Pasco
2020-08-28 1:56 ` Drew DeVault
2020-08-27 23:23 ` Junio C Hamano
2020-08-27 23:24 ` Drew DeVault
2020-08-28 18:39 ` Drew DeVault
2020-08-28 20:58 ` Raymond E. Pasco
2020-08-28 21:00 ` Junio C Hamano
2020-08-28 21:01 ` Drew DeVault
2020-08-28 21:33 ` Junio C Hamano
2020-08-28 21:35 ` Drew DeVault
2020-08-27 19:21 ` Junio C Hamano
2020-08-27 19:22 ` Drew DeVault
2020-08-27 19:15 ` Drew DeVault
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=xmqqtuwnq3x1.fsf@gitster.c.googlers.com \
--to=gitster@pobox.com \
--cc=carenas@gmail.com \
--cc=git@vger.kernel.org \
--cc=sir@cmpwn.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).