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

Re: [PATCH v2] blame: add blame.showEmail configuration

From
Junio C Hamano <gitster@pobox.com>
Date
May 31, 2015, 18:13 UTC
Message-ID
<xmqqa8wkaa4c.fsf@gitster.dls.corp.google.com>
In-Reply-To
<1433021926-17762-1-git-send-email-qneill@quicinc.com>
Quentin Neill <quentin.neill@gmail.com> writes:
Show 5 quoted lines
> From: Quentin Neill <quentin.neill@gmail.com>
>
> Complement existing --show-email option with fallback
> configuration variable, with tests.
> ---

The patch itself looks very reasonable. Thanks for getting back to us ;-)

A few minor nits:
    - Your in-body "From:" is redundant and unnecessary, as your
      e-mail is coming from the same address.
    - You need "Signed-off-by: Quentin Neill <quentin.neill@gmail.com>"
      after your log message (separate it with a blank line before
      the sign-off, and place the sign-off before the three-dash
      lines).
Show 21 quoted lines
> diff --git a/t/t8002-blame.sh b/t/t8002-blame.sh
> index 5cdf3f1..faf1660 100755
> --- a/t/t8002-blame.sh
> +++ b/t/t8002-blame.sh
> @@ -19,4 +19,66 @@ test_expect_success 'blame --show-email' '
>  		"<E at test dot git>" 1
>  '
>  
> +test_expect_success 'setup showEmail tests' '
> +	echo "bin: test number 1" >one &&
> +	git add . &&
> +	GIT_AUTHOR_NAME=name1 GIT_AUTHOR_EMAIL=email1@test.git git commit -a -m First --date="2010-01-01 01:00:00"
> +'
> +
> +cat >expected_n <<\EOF &&
> +(name1 2010-01-01 01:00:00 +0000 1) bin: test number 1
> +EOF
> +
> +cat >expected_e <<\EOF &&
> +(<email1@test.git> 2010-01-01 01:00:00 +0000 1) bin: test number 1
> +EOF
These two commands outside test_expect_success are part of setup, so
	test_expect_success 'setup showEmail tests' '
        	echo "bin: test number 1" >one &&
                git add one &&
                GIT_AUTHOR_NAME=name1 \
                GIT_AUTHOR_EMAIL=email1@test.git \
                git commit -m First --date="2010-01-01 01:00:00" &&
		cat >expected_n <<-\EOF &&
                (name1 ...
                EOF
                cat >expected_e <<-\EOF
                (<email1@...
		EOF
	'
Also do not hesitate to break overlong lines with "\".
> +find_blame() {
style: "find_blame () {"
Other than that, the patch looks good.
Thanks.
Previous: Quentin NeillNext: Quentin Neill
Message 15 of 17 in “blame: add blame.showemail config option”
  1. blame: add blame.showemail config optionQuentin Neill, Apr 24, 2015
  2. Eric SunshineApr 24, 2015
  3. Quentin NeillApr 27, 2015
  4. Junio C HamanoApr 27, 2015
  5. Eric SunshineApr 27, 2015
  6. Junio C HamanoApr 28, 2015
  7. Quentin NeillApr 30, 2015
  8. Junio C HamanoApr 30, 2015
  9. Eric SunshineApr 30, 2015
  10. Junio C HamanoApr 30, 2015
  11. Eric SunshineApr 27, 2015
  12. Junio C HamanoMay 29, 2015
  13. Quentin NeillMay 30, 2015
  14. blame: add blame.showEmail configurationQuentin Neill, May 30, 2015
  15. Junio C HamanoMay 31, 2015
  16. Quentin NeillMay 31, 2015
  17. blame: add blame.showEmail configurationQuentin Neill, May 31, 2015

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.