Skip to content

Commit 3667a5b

Browse files
felipecgitster
authored andcommitted
t5801 (remote-helpers): cleanup environment sets
Commit 512477b (tests: use "env" to run commands with temporary env-var settings) missed some variables in the remote-helpers test. Also standardize these. Signed-off-by: Felipe Contreras <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 3994e64 commit 3667a5b

File tree

1 file changed

+4
-7
lines changed

1 file changed

+4
-7
lines changed

t/t5801-remote-helpers.sh

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -212,9 +212,8 @@ test_expect_success 'push update refs failure' '
212212
echo "update fail" >>file &&
213213
git commit -a -m "update fail" &&
214214
git rev-parse --verify testgit/origin/heads/update >expect &&
215-
GIT_REMOTE_TESTGIT_PUSH_ERROR="non-fast forward" &&
216-
export GIT_REMOTE_TESTGIT_PUSH_ERROR &&
217-
test_expect_code 1 git push origin update &&
215+
test_expect_code 1 env GIT_REMOTE_TESTGIT_FAILURE="non-fast forward" \
216+
git push origin update &&
218217
git rev-parse --verify testgit/origin/heads/update >actual &&
219218
test_cmp expect actual
220219
)
@@ -235,10 +234,8 @@ cmp_marks () {
235234
}
236235

237236
test_expect_success 'proper failure checks for fetching' '
238-
(GIT_REMOTE_TESTGIT_FAILURE=1 &&
239-
export GIT_REMOTE_TESTGIT_FAILURE &&
240-
cd local &&
241-
test_must_fail git fetch 2> error &&
237+
(cd local &&
238+
test_must_fail env GIT_REMOTE_TESTGIT_FAILURE=1 git fetch 2>error &&
242239
cat error &&
243240
grep -q "Error while running fast-import" error
244241
)

0 commit comments

Comments
 (0)