From: Matthieu Moy <Matthieu.Moy@grenoble-inp.fr>
To: Remi Lespinet <remi.lespinet@ensimag.grenoble-inp.fr>
Cc: git@vger.kernel.org,
Remi Galan <remi.galan-alfonso@ensimag.grenoble-inp.fr>,
Guillaume Pages <guillaume.pages@ensimag.grenoble-inp.fr>,
Louis-Alexandre Stuber
<louis--alexandre.stuber@ensimag.grenoble-inp.fr>,
Antoine Delaite <antoine.delaite@ensimag.grenoble-inp.fr>
Subject: Re: [PATCH v3 7/7] send-email: suppress leading and trailing whitespaces before alias expansion
Date: Wed, 10 Jun 2015 10:32:26 +0200 [thread overview]
Message-ID: <vpqa8w89d5x.fsf@anie.imag.fr> (raw)
In-Reply-To: <1433875804-16007-2-git-send-email-remi.lespinet@ensimag.grenoble-inp.fr> (Remi Lespinet's message of "Tue, 9 Jun 2015 20:50:04 +0200")
Remi Lespinet <remi.lespinet@ensimag.grenoble-inp.fr> writes:
> As alias file formats supported by git send-email doesn't take
> whitespace into account, it is useless to consider whitespaces in
> alias name. remove leading and trailing whitespace before expanding
s/remove/Remove/
> allow to recognize strings like " alias" or "alias\t" passed by --to,
> --cc, --bcc options or by the git send-email prompt.
>
> Signed-off-by: Remi Lespinet <remi.lespinet@ensimag.grenoble-inp.fr>
> ---
> git-send-email.perl | 1 +
> t/t9001-send-email.sh | 24 ++++++++++++++++++++++++
> 2 files changed, 25 insertions(+)
>
> diff --git a/git-send-email.perl b/git-send-email.perl
> index 3d144bd..34c8b8b 100755
> --- a/git-send-email.perl
> +++ b/git-send-email.perl
> @@ -787,6 +787,7 @@ sub expand_aliases {
> my %EXPANDED_ALIASES;
> sub expand_one_alias {
> my $alias = shift;
> + $alias =~ s/^\s+|\s+$//g;
> if ($EXPANDED_ALIASES{$alias}) {
> die "fatal: alias '$alias' expands to itself\n";
> }
You should explain why you need that, when the previous patch was
already about removing whitespaces around addresses. I finally
understood that this was needed because alias expansion comes before
sanitize_address, but the commit message should have told me that.
Actually, once you have this, PATCH 6/7 becomes useless, right? (at
least, the test passes if I revert it)
It seems to me that doing this space trimming just once, inside or right
after split_at_commas would be clearer.
--
Matthieu Moy
http://www-verimag.imag.fr/~moy/
next prev parent reply other threads:[~2015-06-10 8:32 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-06-09 18:50 [PATCH v3 6/7] send-email: suppress leading and trailing whitespaces in addresses Remi Lespinet
2015-06-09 18:50 ` [PATCH v3 7/7] send-email: suppress leading and trailing whitespaces before alias expansion Remi Lespinet
2015-06-10 8:32 ` Matthieu Moy [this message]
2015-06-10 9:30 ` Remi Lespinet
2015-06-10 15:15 ` Junio C Hamano
2015-06-10 15:28 ` Matthieu Moy
2015-06-10 16:10 ` Remi Lespinet
2015-06-10 16:15 ` Junio C Hamano
2015-06-10 16:25 ` Matthieu Moy
2015-06-10 8:17 ` [PATCH v3 6/7] send-email: suppress leading and trailing whitespaces in addresses Matthieu Moy
2015-06-10 8:33 ` Remi Lespinet
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=vpqa8w89d5x.fsf@anie.imag.fr \
--to=matthieu.moy@grenoble-inp.fr \
--cc=antoine.delaite@ensimag.grenoble-inp.fr \
--cc=git@vger.kernel.org \
--cc=guillaume.pages@ensimag.grenoble-inp.fr \
--cc=louis--alexandre.stuber@ensimag.grenoble-inp.fr \
--cc=remi.galan-alfonso@ensimag.grenoble-inp.fr \
--cc=remi.lespinet@ensimag.grenoble-inp.fr \
/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.