All of lore.kernel.org
 help / color / mirror / Atom feed
From: Matthieu Moy <Matthieu.Moy@grenoble-inp.fr>
To: Junio C Hamano <gitster@pobox.com>
Cc: Remi Lespinet <remi.lespinet@ensimag.grenoble-inp.fr>,
	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 17:28:48 +0200	[thread overview]
Message-ID: <vpqoaknr39r.fsf@anie.imag.fr> (raw)
In-Reply-To: <xmqqa8w7oarl.fsf@gitster.dls.corp.google.com> (Junio C. Hamano's message of "Wed, 10 Jun 2015 08:15:10 -0700")

Junio C Hamano <gitster@pobox.com> writes:

> 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/

  reply	other threads:[~2015-06-10 15:42 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
2015-06-10  9:30     ` Remi Lespinet
2015-06-10 15:15       ` Junio C Hamano
2015-06-10 15:28         ` Matthieu Moy [this message]
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=vpqoaknr39r.fsf@anie.imag.fr \
    --to=matthieu.moy@grenoble-inp.fr \
    --cc=antoine.delaite@ensimag.grenoble-inp.fr \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --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.