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

Re: [PATCH] git-send-email: fix get_maintainer.pl regression

From
Alex Bennée <alex.bennee@linaro.org>
Date
Nov 16, 2017, 16:46 UTC
Message-ID
<874lpu189c.fsf@linaro.org>
In-Reply-To
<20171116154814.23785-1-alex.bennee@linaro.org>
Alex Bennée <alex.bennee@linaro.org> writes:
> Getting rid of Mail::Address regressed behaviour with common
> get_maintainer scripts such as the Linux kernel. Fix the missed corner
> case and add a test for it.
>
<snip>
Show 29 quoted lines
> diff --git a/t/t9001-send-email.sh b/t/t9001-send-email.sh
> index 4d261c2a9..0bcd7ab96 100755
> --- a/t/t9001-send-email.sh
> +++ b/t/t9001-send-email.sh
> @@ -172,6 +172,27 @@ test_expect_success $PREREQ 'cc trailer with various syntax' '
>  	test_cmp expected-cc commandline1
>  '
>
> +test_expect_success $PREREQ 'setup get_mainter script for cc trailer' "
> +cat >expected-cc-script.sh <<-EOF && chmod +x expected-cc-script.sh
> +#!/bin/sh
> +echo 'One Person <one@example.com> (supporter:THIS (FOO/bar))'
> +echo 'Two Person <two@example.com> (maintainer:THIS THING)'
> +echo 'Third List <three@example.com> (moderated list:THIS THING (FOO/bar))'
> +echo '<four@example.com> (moderated list:FOR THING)'
> +echo 'five@example.com (open list:FOR THING (FOO/bar))'
> +echo 'six@example.com (open list)'
> +EOF
> +"
> +
> +test_expect_success $PREREQ 'cc trailer with get_maintainer output' '
> +	test_commit cc-trailer &&
> +	clean_fake_sendmail &&
> +	git send-email -1 --to=recipient@example.com \
> +		--cc-cmd="$(pwd)/expected-cc-script.sh" \
> +		--smtp-server="$(pwd)/fake.sendmail" &&
> +	test_cmp expected-cc commandline1
> +'
> +

OK I'm afraid I don't fully understand the test harness as this breaks a bunch of other tests. If anyone can offer some pointers on how to fix I'd be grateful.

In the meantime I know the core change works because I tested with:

#+name: send-patches-dry-run #+begin_src sh :results output # temp workaround export PERL5LIB=/home/alex/src/git.git/perl/ git send-email --confirm=never --dry-run --quiet ${mailto} ${series}.patches/* #+end_src

When I sent my last set of kernel patches to the list (the workflow that was broken before by the cc9075067776ebd34cc08f31bf78bb05f12fd879 change landing via my git stable PPA).

-- Alex Bennée

Previous: Alex BennéeNext: Eric Sunshine
Message 2 of 27 in “git-send-email: fix get_maintainer.pl regression”
  1. git-send-email: fix get_maintainer.pl regressionAlex Bennée, Nov 16, 2017
  2. Alex BennéeNov 16, 2017
  3. Eric SunshineNov 19, 2017
  4. Alex BennéeNov 20, 2017
  5. Eric SunshineNov 20, 2017
  6. Eric SunshineNov 20, 2017
  7. Philip OakleyNov 21, 2017
  8. Eric SunshineNov 21, 2017
  9. Junio C HamanoNov 21, 2017
  10. Eric SunshineNov 20, 2017
  11. Alex BennéeNov 21, 2017
  12. Thomas AdamNov 21, 2017
  13. Junio C HamanoNov 22, 2017
  14. Alex BennéeDec 11, 2017
  15. Thomas AdamDec 11, 2017
  16. Ævar Arnfjörð BjarmasonDec 11, 2017
  17. Thomas AdamDec 12, 2017
  18. Ævar Arnfjörð BjarmasonDec 12, 2017
  19. Alex BennéeDec 12, 2017
  20. Ævar Arnfjörð BjarmasonDec 12, 2017
  21. Junio C HamanoDec 12, 2017
  22. Ævar Arnfjörð BjarmasonDec 12, 2017
  23. Junio C HamanoDec 12, 2017
  24. Matthieu MoyNov 22, 2017
  25. Alex BennéeNov 22, 2017
  26. Thomas AdamNov 22, 2017
  27. Junio C HamanoNov 22, 2017

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.