From: Junio C Hamano <gitster@pobox.com>
To: Alyssa Ross <hi@alyssa.is>
Cc: git@vger.kernel.org, "Ævar Arnfjörð Bjarmason" <avarab@gmail.com>
Subject: Re: [PATCH] send-email: always confirm by default
Date: Fri, 22 Apr 2022 10:09:09 -0700 [thread overview]
Message-ID: <xmqq7d7havuy.fsf@gitster.g> (raw)
In-Reply-To: <20220422083629.1404989-1-hi@alyssa.is> (Alyssa Ross's message of "Fri, 22 Apr 2022 08:36:29 +0000")
Alyssa Ross <hi@alyssa.is> writes:
> For novice users, it can be very intimidating for git send-email to send
> off a lot of mail without prompting for confirmation. These users are
> likely to not know it's even possible to configure git to behave
> differently. So let's set a novice-friendly default — expert users who
> don't need to be prompted every time will be able to set
> sendemail.confirm to their preference, although from my small sample it
> sounds plenty of expert users already rely on sendemail.confirm =
> always.
One thing the current behaviour of "confirm" makes a bad end-user
experience for recipients is that you can individually say "no, this
message has wrong address on the CC line, do not send it" and the
receivers end up seeing [1/4] [2/4] [4/4] and left wondering what
happend to [3/4], until [3/4] alone is resent.
Iterating over messages and letting the user examine the headers for
each of them is perfectly fine, but it would make it much nicer to
recipients if the choices are collected first and then even a single
NO stops the entire series from getting sent.
[Side note] As with everything else in Git, which is a tool
to help people interact with each other better, we give
priority to avoid wasting time of the more populous side,
and naturally, we should aim to make it less annoying to
receivers even if it means that the sender needs to spend a
bit more time to send the right things to the right people.
And making "confirm" the default before it is fixed may make it
easier to annoy receivers.
> I also think this approach is better than forbidding the all-in-one
> format-patch + send-email, because it wouldn't give an accurate preview
> of recipients, because automatic CCs are added by send-email, not
> format-patch.
I do not think this part matches reality. format-patch alone does
not manage CC or To at all. What the separation of send-email and
format-patch does is to train people to actually proofread what they
are going to send out. Being able to add Cc: and To: at the header
part (instead of adding Cc: to trailers and have send-email to pick
them up, which is error prone and forcing you to advocate this
default change so that you can check at the last minute) of the
generated patch text is icing on the cake ;-)
> if ($confirm_unconfigured) {
> - $confirm = scalar %suppress_cc ? 'compose' : 'auto';
> + $confirm = 'always';
This got a lot simpler. I've always wondered why this "if suppress
CC is there, then default to 'compose' and otherwise 'auto'" makes a
sensible default.
> diff --git a/t/t9001-send-email.sh b/t/t9001-send-email.sh
> index 42694fe584..e11730f3dc 100755
> --- a/t/t9001-send-email.sh
> +++ b/t/t9001-send-email.sh
> @@ -74,8 +74,8 @@ check_no_confirm () {
> return 0
> }
>
> -test_expect_success $PREREQ 'No confirm with --suppress-cc' '
> - test_no_confirm --suppress-cc=sob &&
> +test_expect_success $PREREQ 'No confirm with --confirm=compose --suppress-cc' '
> + test_no_confirm --confirm=compose --suppress-cc=sob &&
> check_no_confirm
> '
>
> @@ -1032,16 +1032,10 @@ test_expect_success $PREREQ '--confirm=compose' '
> test_confirm --confirm=compose --compose
> '
>
> -test_expect_success $PREREQ 'confirm by default (due to cc)' '
> +test_expect_success $PREREQ 'confirm by default' '
> test_when_finished git config sendemail.confirm never &&
> git config --unset sendemail.confirm &&
> - test_confirm
> -'
> -
> -test_expect_success $PREREQ 'confirm by default (due to --compose)' '
> - test_when_finished git config sendemail.confirm never &&
> - git config --unset sendemail.confirm &&
> - test_confirm --suppress-cc=all --compose
> + test_confirm --suppress-cc=all
> '
It is curious that the change to the test this patch adds are only
to adjust to the fallout the change of the default causes, and there
is no new test to make sure that unconfigured sendemail.confirm
triggers confirmation dialogue.
I still have reservations, as I would eventually have to sell those
existing users that this usability regression [*1*] is worth having
in the new release. It will need a large backward-compatibility note
in the Release Notes, at least.
But assuming that you can help convince these few dozens of existing
Git users out there that it is worth doing, the implementation seems
correct to me.
Thanks.
[Footnote]
*1* The existing users will be surprised by sudden appearance of
unexpected confirmation dialogue, which they may have never seen,
and have to decide
(1) keep saying "yes" to send out the current series, or
(2) abort, read release notes and finally configure the
sendemail.confirm away before resending
soon after updating their Git. They will be extremely annoyed if
that happens when they were about to send out a large series.
next prev parent reply other threads:[~2022-04-22 17:09 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-04-21 19:48 Should sendemail.confirm default to always? Alyssa Ross
2022-04-21 19:58 ` Ævar Arnfjörð Bjarmason
2022-04-21 21:47 ` Junio C Hamano
2022-04-21 22:38 ` Failures in t9001-send-email Alyssa Ross
2022-04-21 23:19 ` rsbecker
2022-04-22 7:56 ` Alyssa Ross
2022-04-22 10:41 ` rsbecker
2022-04-22 5:40 ` Johannes Sixt
2022-04-22 6:51 ` Junio C Hamano
2022-04-22 8:00 ` Alyssa Ross
2022-04-22 8:36 ` [PATCH] send-email: always confirm by default Alyssa Ross
2022-04-22 11:16 ` Ævar Arnfjörð Bjarmason
2022-04-22 17:09 ` Junio C Hamano [this message]
2022-04-21 20:04 ` Should sendemail.confirm default to always? Junio C Hamano
2022-04-21 20:37 ` Alyssa Ross
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=xmqq7d7havuy.fsf@gitster.g \
--to=gitster@pobox.com \
--cc=avarab@gmail.com \
--cc=git@vger.kernel.org \
--cc=hi@alyssa.is \
/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).