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

Re: commit: support commit.verbose and --no-verbose

From
Junio C Hamano <gitster@pobox.com>
Date
May 27, 2014, 18:10 UTC
Message-ID
<xmqq4n0bgkib.fsf@gitster.dls.corp.google.com>
In-Reply-To
<20140524075219.GA17093@hudson.localdomain>
Jeremiah Mahler <jmmahler@gmail.com> writes:
Show 25 quoted lines
> On Fri, May 23, 2014 at 04:22:22PM -0500, Caleb Thompson wrote:
>> This patch allows people to set `commit.verbose` to implicitly send `--verbose`
> ...
>>  
>> +cat >check-for-no-diff <<EOF
>> +#!$SHELL_PATH
>> +exec grep -v '^diff --git' "\$1"
>> +EOF
>> +chmod +x check-for-no-diff
>> +
>
> For new tests, commands like this should be placed inside a
> test_expect_success structure.  However, I can see why you did it this
> way since the code just above it does it this way.
> Perhaps others will have some recommendations.
>
> Also, <<\-EOF is used instead of <<EOF to remove the tabs.
>
> test_expect_success 'commit verbose setup' '
> 	cat >check-for-no-diff <<\-EOF &&
> 	#!SHELL_PATH
> 	exec grep -v '^diff --git' "\$1"
> 	EOF
> 	chmod +x check-for-no-diff
> '
Also tests use write_script these days to do this kind of thing.
Previous: Jeremiah MahlerNext: Duy Nguyen
Message 3 of 4 in “commit: support commit.verbose and --no-verbose”
  1. Caleb ThompsonMay 23, 2014
  2. Jeremiah MahlerMay 24, 2014
  3. Junio C HamanoMay 27, 2014
  4. Duy NguyenMay 24, 2014

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.