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

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 suggests that split-at-commas _is_ a wrong abstraction, doesn't
it?  In other words, I think whitespace trimming is part of what the
split-a-single-string-into-array-of-addresses helper function should
be doing.

  reply	other threads:[~2015-06-10 15:15 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 [this message]
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=xmqqa8w7oarl.fsf@gitster.dls.corp.google.com \
    --to=gitster@pobox.com \
    --cc=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.