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

Re: [PATCH v5] Add log.abbrevCommit config variable

From
Junio C Hamano <gitster@pobox.com>
Date
May 18, 2011, 04:22 UTC
Message-ID
<7vmxikeiyt.fsf@alter.siamese.dyndns.org>
In-Reply-To
<1305681991-11699-1-git-send-email-jaysoffian@gmail.com>
Jay Soffian <jaysoffian@gmail.com> writes:
Show 26 quoted lines
> +test_expect_success 'log.abbrev-commit configuration' '
> +	test_when_finished "git config --unset log.abbrevCommit" &&
> +
> +	git log >expect.full &&
> +	git log --abbrev-commit >expect.abbrev &&
> +	git log --pretty=raw >expect.raw &&
> +	git log -g --abbrev-commit --pretty=oneline >expect.reflog &&
> +	git whatchanged --abbrev-commit >expect.whatchanged &&
> +
> +	git config log.abbrevCommit true &&
> +
> +	git log --no-abbrev-commit >actual.full &&
> +	test_cmp expect.full actual.full &&
> +
> +	git log >actual.abbrev &&
> +	test_cmp expect.abbrev actual.abbrev &&
> +
> +	git log --pretty=raw >actual.raw &&
> +	test_cmp expect.raw actual.raw &&
> +
> +	git reflog >actual.reflog &&
> +	test_cmp expect.reflog actual.reflog
> +
> +	git whatchanged >actual.whatchanged &&
> +	test_cmp expect.whatchanged actual.whatchanged
> +'

I can see you are testing all the commands in the "log" family for cases where the new configuration _should_ take effect, but I cannot see the same throughness for the negative case where the configuration should not kick in. Is "log" the only one that you make sure --no-abbrev-commit defeats the configuration? Please always test both sides of the coin.

Other than that, the patch looked fine from my cursory look.
Thanks.
Previous: Jay SoffianNext: Jay Soffian
Message 2 of 3 in “Add log.abbrevCommit config variable”
  1. Add log.abbrevCommit config variableJay Soffian, May 18, 2011
  2. Junio C HamanoMay 18, 2011
  3. Jay SoffianMay 18, 2011

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.