git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Rasmus Villemoes <rv@rasmusvillemoes.dk>
To: Junio C Hamano <gitster@pobox.com>
Cc: "Ævar Arnfjörð Bjarmason" <avarab@gmail.com>, git@vger.kernel.org
Subject: Re: [PATCH 2/3] send-email: only consider lines containing @ or <> for automatic Cc'ing
Date: Thu, 11 Oct 2018 09:06:10 +0200	[thread overview]
Message-ID: <f5c401a6-f329-1076-ab4b-2f52915047bf@rasmusvillemoes.dk> (raw)
In-Reply-To: <xmqqk1mpggpq.fsf@gitster-ct.c.googlers.com>

On 2018-10-11 08:06, Junio C Hamano wrote:
> Rasmus Villemoes <rv@rasmusvillemoes.dk> writes:
> 
>> I considered that (and also had a version where I simply insisted on a @
>> being present), but that means the user no longer would get prompted
>> about the cases where the address was just slightly obfuscated, e.g. the
>>
>> Cc: John Doe <john at doe.com>
>>
>> cases, which would be a regression, I guess. So I do want to pass such
>> cases through, and have them be dealt with when process_address_list
>> gets called.
> 
> We are only tightening with this patch, and we were passing any
> random things through with the original code anyway, so without
> [PATCH 3/3], this step must be making it only better, but I have to
> wonder one thing.
> 
> You keep saying "get prompted" but are we sure we always stop and
> ask (and preferrably---fail and abort when the end user is not
> available at the terminal to interact) when we have such a
> questionable address?
> 

I dunno. I guess I've never considered non-interactive use of
send-email. But the ask() in validate_address does have default q[uit],
which I suppose gets used if stdin is /dev/null? I did do an experiment
adding a bunch of the random odd patterns found in kernel commit
messages to see how send-email reacted before/after this, and the only
things that got filtered away (i.e., no longer prompted about) were
things where the user probably couldn't easily fix it anyway. In the
cases where there was a "Cc: stable" that might be fixed to the proper
stable@vger.kernel.org, the logic in extract_valid_address simply saw
that as a local address, so we didn't use to be prompted, but simply
sent to stable@localhost. Now we simply don't pass that through. So, for
non-interactive use, I guess the effect of this patch is to allow more
cases to complete succesfully, since we filter away (some) cases where
extract_valid_address would cause us to prompt (and thus quit).

So, it seems you're ok with this tightening, but some comment on the
non-interactive use case should be made in the commit log? Or am I
misunderstanding?

Thanks,
Rasmus

  reply	other threads:[~2018-10-11  7:06 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-10-10 11:13 [PATCH 0/3] send-email: Also pick up cc addresses from -by trailers Rasmus Villemoes
2018-10-10 11:13 ` [PATCH 1/3] Documentation/git-send-email.txt: style fixes Rasmus Villemoes
2018-10-10 11:13 ` [PATCH 2/3] send-email: only consider lines containing @ or <> for automatic Cc'ing Rasmus Villemoes
2018-10-10 12:57   ` Ævar Arnfjörð Bjarmason
2018-10-10 13:29     ` Rasmus Villemoes
2018-10-11  6:06       ` Junio C Hamano
2018-10-11  7:06         ` Rasmus Villemoes [this message]
2018-10-11  8:22           ` Junio C Hamano
2018-10-10 11:13 ` [PATCH 3/3] send-email: also pick up cc addresses from -by trailers Rasmus Villemoes
2018-10-10 12:51   ` Ævar Arnfjörð Bjarmason
2018-10-11  6:18   ` Junio C Hamano
2018-10-11  7:11     ` Rasmus Villemoes
2018-10-16  5:57       ` Junio C Hamano
2018-10-16  7:17         ` Rasmus Villemoes
2018-10-16  7:46           ` Junio C Hamano
2018-10-16  7:39 ` [PATCH v2 0/3] send-email: Also " Rasmus Villemoes
2018-10-16  7:39   ` [PATCH v2 1/3] Documentation/git-send-email.txt: style fixes Rasmus Villemoes
2018-10-16  7:39   ` [PATCH v2 2/3] send-email: only consider lines containing @ or <> for automatic Cc'ing Rasmus Villemoes
2018-10-16  7:39   ` [PATCH v2 3/3] send-email: also pick up cc addresses from -by trailers Rasmus Villemoes
2018-10-16  7:57   ` [PATCH v2 0/3] send-email: Also " Junio C Hamano

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

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=f5c401a6-f329-1076-ab4b-2f52915047bf@rasmusvillemoes.dk \
    --to=rv@rasmusvillemoes.dk \
    --cc=avarab@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.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.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

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 read-only IMAP folder(s) and NNTP newsgroup(s).