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

Re: [PATCH] difftool: fix bug when printing usage

From
Junio C Hamano <gitster@pobox.com>
Date
Feb 7, 2017, 20:06 UTC
Message-ID
<xmqqd1etzrxj.fsf@gitster.mtv.corp.google.com>
In-Reply-To
<xmqqh945zs3c.fsf@gitster.mtv.corp.google.com>
Junio C Hamano <gitster@pobox.com> writes:
Show 17 quoted lines
> Johannes Schindelin <Johannes.Schindelin@gmx.de> writes:
>
>>> > Likewise, this would become
>>> >
>>> > 	GIT_CEILING_DIRECTORIES="$PWD/not" \
>>> > 	test_expect_code 129 git -C not/repo difftool -h >output &&
>>> > 	grep ^usage: output
>>> 
>>> I agree with the intent, but the execution here is "Not quite".
>>> test_expect_code being a shell function, it does not take the
>>> "one-shot environment assignment for this single invocation," like
>>> external commands do.
>>
>> So now that we know what is wrong, can you please enlighten me about what
>> is right?
>
> David's original is just fine, isn't it?

I've also seen people use "env VAR=VAL git command" as the command to be tested in t/ scripts. You can run that under test_expect_code, methinks.

Previous: Junio C HamanoNext: Johannes Schindelin
Message 11 of 12 in “Remove --no-gui option from difftool usage string”
  1. Remove --no-gui option from difftool usage stringDenton Liu, Feb 4, 2017
  2. Jacob KellerFeb 4, 2017
  3. Denton LiuFeb 4, 2017
  4. David AguilarFeb 5, 2017
  5. [BUG] was: Re: [PATCH] Remove --no-gui option from difftool usage stringDavid Aguilar, Feb 5, 2017
  6. difftool: fix bug when printing usageDavid Aguilar, Feb 5, 2017
  7. Johannes SchindelinFeb 6, 2017
  8. Junio C HamanoFeb 6, 2017
  9. Johannes SchindelinFeb 7, 2017
  10. Junio C HamanoFeb 7, 2017
  11. Junio C HamanoFeb 7, 2017
  12. Johannes SchindelinFeb 8, 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.