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

Re: [PATCH 2/2] transport-helper: fix remote helper namespace regression

From
Junio C Hamano <gitster@pobox.com>
Date
May 10, 2013, 20:55 UTC
Message-ID
<7vli7mzha6.fsf@alter.siamese.dyndns.org>
In-Reply-To
<CAMP44s2QHd7b2t654hnMw_xca0OJKjUjEgP2yU4PUe-w4z-zBg@mail.gmail.com>
Felipe Contreras <felipe.contreras@gmail.com> writes:
Show 16 quoted lines
> On Fri, May 10, 2013 at 3:28 PM, Junio C Hamano <gitster@pobox.com> wrote:
>> Felipe Contreras <felipe.contreras@gmail.com> writes:
>>
>>> +test_expect_success 'push update refs failure' '
>>> +     (cd local &&
>>> +     git checkout update &&
>>> +     echo "update fail" >>file &&
>>> +     git commit -a -m "update fail" &&
>>> +     git rev-parse --verify testgit/origin/heads/update >expect &&
>>> +     GIT_REMOTE_TESTGIT_PUSH_ERROR="non-fast forward" \
>>> +     test_expect_code 1 git push origin update &&
>>
>> This is not portable
>
> Why not? Other parts of this script run commands with environment
> variables like this.

There is a difference between a proper command and a shell function with respect to the single-shot environment assignment.

	VAR=VAL command args
is fine, but
	VAR=VAL shell_function args
is not.

People often make this mistake and we had to fix it number of times in t/ directory.

Previous: Felipe Contreras
Message 7 of 7 in “transport-helper: fixes”
  1. 0/2 transport-helper: fixesFelipe Contreras, May 10, 2013
  2. 1/2 test: remote-helper: add missing andFelipe Contreras, May 10, 2013
  3. 2/2 transport-helper: fix remote helper namespace regressionFelipe Contreras, May 10, 2013
  4. Junio C HamanoMay 10, 2013
  5. Junio C HamanoMay 10, 2013
  6. Felipe ContrerasMay 10, 2013
  7. Junio C HamanoMay 10, 2013

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.