Re: [PATCH v3 7/7] send-email: suppress leading and trailing whitespaces before alias expansion
- From
Matthieu Moy <matthieu.moy@grenoble-inp.fr>
- Date
- Jun 10, 2015, 15:28 UTC
- Message-ID
- <vpqoaknr39r.fsf@anie.imag.fr>
- In-Reply-To
- <xmqqa8w7oarl.fsf@gitster.dls.corp.google.com>
Junio C Hamano <gitster@pobox.com> writes:
Show 10 quoted lines
> Remi Lespinet <remi.lespinet@ensimag.grenoble-inp.fr> writes:
>
>> I agree, I'd like to put it right after split_at_commas in a separate
>> function "trim_list". Is it a good idea even if the function is one
>> line long ?
>
> Hmph, if I have "A, B, C" and call a function that gives an array of
> addresses, treating the input as comma-separated addresses, I would
> expect ("A", "B", "C") to be returned from that function, instead of
> having to later trim the whitespace around what is returned.It is actually doing this. But if you have " A,B,C ", then you'll get " A", "B", "C ". But once you're trimming around commas, trimming leading and trailing spaces fits well with split itself.
-- Matthieu Moy http://www-verimag.imag.fr/~moy/