From: Junio C Hamano <gitster@pobox.com>
To: Felipe Contreras <felipe.contreras@gmail.com>
Cc: git@vger.kernel.org
Subject: Re: [PATCH] send-email: add extra safetly in address sanitazion
Date: Sun, 05 Feb 2012 13:12:16 -0800 [thread overview]
Message-ID: <7v4nv5gf2n.fsf@alter.siamese.dyndns.org> (raw)
In-Reply-To: <CAMP44s0xfbxLs_r81ppO9hYf3ML_gaYCaW3TKpLM=BjfaM8vHg@mail.gmail.com> (Felipe Contreras's message of "Sat, 4 Feb 2012 17:26:01 +0200")
Felipe Contreras <felipe.contreras@gmail.com> writes:
> On Sat, Feb 4, 2012 at 5:10 PM, Felipe Contreras
> <felipe.contreras@gmail.com> wrote:
>> Otherwise, 'git send-email' would be happy to do:
>>
>> % git send-email --to '<foo@bar.com>>'
>>
>> And use '<foo@bar.com>>' in the headers.
>
> Er, actually that's not correct: '<foo@bar.com>>' will remain the
> same, but 'Foo <foo@bar.com>>' will be sanitized.
I suspect that this "Er" is merely a sympotom of a larger issue in the
approach taken by this patch. The code takes a potentially malformed
input, and applies a rewrite logic without telling the user what it is
doing. If the rewrite logic is perfect, that may be OK, but if not, the
logic to rewrite may or may not trigger, or when it triggers it may or may
not produce a correct result, and it all depends on the nature of breakage
in the input.
Wouldn't a better approach to detect problem on the input side and reject
a wrong one by erroring out, so that the user has a chance to fix?
next prev parent reply other threads:[~2012-02-05 21:12 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-02-04 15:10 [PATCH] send-email: add extra safetly in address sanitazion Felipe Contreras
2012-02-04 15:26 ` Felipe Contreras
2012-02-05 21:12 ` Junio C Hamano [this message]
2012-02-05 21:20 ` Felipe Contreras
-- strict thread matches above, loose matches on Subject: below --
2012-02-04 16:32 Felipe Contreras
2012-02-05 19:39 ` Thomas Rast
2012-02-05 20:51 ` Felipe Contreras
2012-02-05 21:51 ` Thomas Rast
2012-02-06 1:27 ` Felipe Contreras
2012-02-06 1:48 ` Junio C Hamano
2012-02-05 21:52 ` 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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=7v4nv5gf2n.fsf@alter.siamese.dyndns.org \
--to=gitster@pobox.com \
--cc=felipe.contreras@gmail.com \
--cc=git@vger.kernel.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.