git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Jacob Keller <jacob.e.keller@intel.com>
Cc: git@vger.kernel.org,  Jacob Keller <jacob.keller@gmail.com>,
	 Konstantin Ryabitsev <konstantin@linuxfoundation.org>
Subject: Re: [PATCH v2 1/3] t90001-send-email.sh: fix quoting for mailrc --dump-aliases test
Date: Wed, 14 Aug 2024 09:56:14 -0700	[thread overview]
Message-ID: <xmqqy14zyrf5.fsf@gitster.g> (raw)
In-Reply-To: <20240813-jk-translate-alias-send-email-v2-1-912db4eb6846@gmail.com> (Jacob Keller's message of "Tue, 13 Aug 2024 17:05:09 -0700")

Jacob Keller <jacob.e.keller@intel.com> writes:

> From: Jacob Keller <jacob.keller@gmail.com>
>
> The .mailrc alias file format documents that multiple addresses are
> separated by spaces. The alias file used in the t9001 --dump-aliases
> mailrc test have addresses which include both a name and email. These
> are unquoted, so git send-email will parse this as an alias that
> translates to multiple independent addresses.
>
> The existing test does not care about this, as --dump-aliases only dumps
> the alias and not the address. However, it is incorrect for a future
> where --dump-aliases could also dump the mail addresses.
>
> Fix the test to quote the aliases properly, so that they translate to a
> single address.
>
> Signed-off-by: Jacob Keller <jacob.keller@gmail.com>
> ---
>  t/t9001-send-email.sh | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)

Makes sense.  I'll amend the excess "0" out of the title while
queuing.

Thanks.

>
> diff --git a/t/t9001-send-email.sh b/t/t9001-send-email.sh
> index 64a4ab3736ef..aa36ace393b7 100755
> --- a/t/t9001-send-email.sh
> +++ b/t/t9001-send-email.sh
> @@ -2084,9 +2084,9 @@ test_dump_aliases '--dump-aliases mailrc format' \
>  	'bob' \
>  	'chloe' \
>  	'eve' <<-\EOF
> -	alias alice   Alice W Land <awol@example.com>
> -	alias eve     Eve <eve@example.com>
> -	alias bob     Robert Bobbyton <bob@example.com>
> +	alias alice   "Alice W Land <awol@example.com>"
> +	alias eve     "Eve <eve@example.com>"
> +	alias bob     "Robert Bobbyton <bob@example.com>"
>  	alias chloe   chloe@example.com
>  	EOF

  reply	other threads:[~2024-08-14 16:56 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-08-14  0:05 [PATCH v2 0/3] send-email: teach git send-email mode to translate aliases Jacob Keller
2024-08-14  0:05 ` [PATCH v2 1/3] t90001-send-email.sh: fix quoting for mailrc --dump-aliases test Jacob Keller
2024-08-14 16:56   ` Junio C Hamano [this message]
2024-08-14  0:05 ` [PATCH v2 2/3] t9001-send-email.sh: update alias list used for pine test Jacob Keller
2024-08-14 17:02   ` Junio C Hamano
2024-08-14 17:47     ` Jacob Keller
2024-08-14  0:05 ` [PATCH v2 3/3] send-email: teach git send-email option to translate aliases Jacob Keller
2024-08-14 16:54 ` [PATCH v2 0/3] send-email: teach git send-email mode " Junio C Hamano
2024-08-14 17:45   ` Jacob Keller
2024-08-14 18:41     ` Junio C Hamano
2024-08-15 14:29 ` Konstantin Ryabitsev
2024-08-15 22:57 ` Junio C Hamano
2024-08-15 23:46   ` Keller, Jacob E

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=xmqqy14zyrf5.fsf@gitster.g \
    --to=gitster@pobox.com \
    --cc=git@vger.kernel.org \
    --cc=jacob.e.keller@intel.com \
    --cc=jacob.keller@gmail.com \
    --cc=konstantin@linuxfoundation.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).