Thread (1 message) 1 message, 1 author, 2016-06-15

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

From: Junio C Hamano <hidden>
Date: 2016-06-15 22:57:12

Felipe Contreras [off-list ref] writes:
On Fri, May 10, 2013 at 3:28 PM, Junio C Hamano [off-list ref] wrote:
quoted
Felipe Contreras [off-list ref] writes:
quoted
+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.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help