git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH v2 1/3] t90001-send-email.sh: fix quoting for mailrc --dump-aliases test

From
Junio C Hamano <gitster@pobox.com>
Date
Aug 14, 2024, 16:56 UTC
Message-ID
<xmqqy14zyrf5.fsf@gitster.g>
In-Reply-To
<20240813-jk-translate-alias-send-email-v2-1-912db4eb6846@gmail.com>
Jacob Keller <jacob.e.keller@intel.com> writes:
Show 19 quoted lines
> 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.
Show 17 quoted lines
>
> 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
Previous: Jacob KellerNext: Jacob Keller
Message 3 of 13 in “send-email: teach git send-email mode to translate aliases”
  1. 0/3 send-email: teach git send-email mode to translate aliasesJacob Keller, Aug 14, 2024
  2. 1/3 t90001-send-email.sh: fix quoting for mailrc --dump-aliases testJacob Keller, Aug 14, 2024
  3. Junio C HamanoAug 14, 2024
  4. 3/3 send-email: teach git send-email option to translate aliasesJacob Keller, Aug 14, 2024
  5. 2/3 t9001-send-email.sh: update alias list used for pine testJacob Keller, Aug 14, 2024
  6. Junio C HamanoAug 14, 2024
  7. Jacob KellerAug 14, 2024
  8. Junio C HamanoAug 14, 2024
  9. Jacob KellerAug 14, 2024
  10. Junio C HamanoAug 14, 2024
  11. Konstantin RyabitsevAug 15, 2024
  12. Junio C HamanoAug 15, 2024
  13. Keller, Jacob EAug 15, 2024

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.