{"thread":{"id":"36451","subject":"[PATCH] t5801 (remote-helpers): cleanup environment sets","startedAt":"2014-04-20T18:43:37Z","lastAt":"2014-04-20T22:15:43Z","messageCount":2,"participants":["Felipe Contreras","Junio C Hamano"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"239154","messageId":"1398019417-8520-1-git-send-email-felipe.contreras@gmail.com","threadId":"36451","inReplyTo":null,"subject":"[PATCH] t5801 (remote-helpers): cleanup environment sets","fromName":"Felipe Contreras","fromEmail":"felipe.contreras@gmail.com","sentAt":"2014-04-20T18:43:37Z","receivedAt":"2014-04-20T18:43:37Z","isPatch":true,"sender":{"key":"felipe.contreras@gmail.com","avatar":"https://avatars.githubusercontent.com/u/8358?v=4"},"body":"Commit 512477b (tests: use \"env\" to run commands with temporary env-var\nsettings) missed some variables in the remote-helpers test. Also\nstandardize these.\n\nSigned-off-by: Felipe Contreras <felipe.contreras@gmail.com>\n---\n t/t5801-remote-helpers.sh | 15 +++++++--------\n 1 file changed, 7 insertions(+), 8 deletions(-)\n\ndiff --git a/t/t5801-remote-helpers.sh b/t/t5801-remote-helpers.sh\nindex 25fd2e7..42d1c66 100755\n--- a/t/t5801-remote-helpers.sh\n+++ b/t/t5801-remote-helpers.sh\n@@ -212,19 +212,17 @@ test_expect_success 'push update refs failure' '\n \techo \"update fail\" >>file &&\n \tgit commit -a -m \"update fail\" &&\n \tgit rev-parse --verify testgit/origin/heads/update >expect &&\n-\tGIT_REMOTE_TESTGIT_PUSH_ERROR=\"non-fast forward\" &&\n-\texport GIT_REMOTE_TESTGIT_PUSH_ERROR &&\n-\ttest_expect_code 1 git push origin update &&\n+\ttest_expect_code 1 env GIT_REMOTE_TESTGIT_FAILURE=\"non-fast forward\" \\\n+\tgit push origin update &&\n \tgit rev-parse --verify testgit/origin/heads/update >actual &&\n \ttest_cmp expect actual\n \t)\n '\n \n test_expect_success 'proper failure checks for fetching' '\n-\t(GIT_REMOTE_TESTGIT_FAILURE=1 &&\n-\texport GIT_REMOTE_TESTGIT_FAILURE &&\n-\tcd local &&\n-\ttest_must_fail git fetch 2> error &&\n+\t(cd local &&\n+\ttest_must_fail env GIT_REMOTE_TESTGIT_FAILURE=1 \\\n+\tgit fetch 2> error &&\n \tcat error &&\n \tgrep -q \"Error while running fast-import\" error\n \t)\n@@ -232,7 +230,8 @@ test_expect_success 'proper failure checks for fetching' '\n \n test_expect_success 'proper failure checks for pushing' '\n \t(cd local &&\n-\ttest_must_fail env GIT_REMOTE_TESTGIT_FAILURE=1 git push --all\n+\ttest_must_fail env GIT_REMOTE_TESTGIT_FAILURE=1 \\\n+\tgit push --all\n \t)\n '\n \n-- \n1.9.1+fc3.9.gc73078e\n"},{"id":"239194","messageId":"7vy4yzk5ps.fsf@alter.siamese.dyndns.org","threadId":"36451","inReplyTo":"1398019417-8520-1-git-send-email-felipe.contreras@gmail.com","subject":"Re: [PATCH] t5801 (remote-helpers): cleanup environment sets","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2014-04-20T22:15:43Z","receivedAt":"2014-04-20T22:15:43Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Felipe Contreras <felipe.contreras@gmail.com> writes:\n\n> Commit 512477b (tests: use \"env\" to run commands with temporary env-var\n> settings) missed some variables in the remote-helpers test. Also\n> standardize these.\n>\n> Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>\n\nGood.  I was wondering about these myself when juggling some series\nthat touched this file the other day.\n\nWill queue.  Thanks.\n\n\n> ---\n>  t/t5801-remote-helpers.sh | 15 +++++++--------\n>  1 file changed, 7 insertions(+), 8 deletions(-)\n>\n> diff --git a/t/t5801-remote-helpers.sh b/t/t5801-remote-helpers.sh\n> index 25fd2e7..42d1c66 100755\n> --- a/t/t5801-remote-helpers.sh\n> +++ b/t/t5801-remote-helpers.sh\n> @@ -212,19 +212,17 @@ test_expect_success 'push update refs failure' '\n>  \techo \"update fail\" >>file &&\n>  \tgit commit -a -m \"update fail\" &&\n>  \tgit rev-parse --verify testgit/origin/heads/update >expect &&\n> -\tGIT_REMOTE_TESTGIT_PUSH_ERROR=\"non-fast forward\" &&\n> -\texport GIT_REMOTE_TESTGIT_PUSH_ERROR &&\n> -\ttest_expect_code 1 git push origin update &&\n> +\ttest_expect_code 1 env GIT_REMOTE_TESTGIT_FAILURE=\"non-fast forward\" \\\n> +\tgit push origin update &&\n>  \tgit rev-parse --verify testgit/origin/heads/update >actual &&\n>  \ttest_cmp expect actual\n>  \t)\n>  '\n>  \n>  test_expect_success 'proper failure checks for fetching' '\n> -\t(GIT_REMOTE_TESTGIT_FAILURE=1 &&\n> -\texport GIT_REMOTE_TESTGIT_FAILURE &&\n> -\tcd local &&\n> -\ttest_must_fail git fetch 2> error &&\n> +\t(cd local &&\n> +\ttest_must_fail env GIT_REMOTE_TESTGIT_FAILURE=1 \\\n> +\tgit fetch 2> error &&\n>  \tcat error &&\n>  \tgrep -q \"Error while running fast-import\" error\n>  \t)\n> @@ -232,7 +230,8 @@ test_expect_success 'proper failure checks for fetching' '\n>  \n>  test_expect_success 'proper failure checks for pushing' '\n>  \t(cd local &&\n> -\ttest_must_fail env GIT_REMOTE_TESTGIT_FAILURE=1 git push --all\n> +\ttest_must_fail env GIT_REMOTE_TESTGIT_FAILURE=1 \\\n> +\tgit push --all\n>  \t)\n>  '\n"}]}