{"thread":{"id":"4847","subject":"[PATCH] t1400-update-ref: set VISUAL=true as well as EDITOR=true","startedAt":"2006-07-11T08:41:20Z","lastAt":"2006-07-11T19:01:54Z","messageCount":3,"participants":["Eric Wong","Junio C Hamano"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"23623","messageId":"11526072802855-git-send-email-normalperson@yhbt.net","threadId":"4847","inReplyTo":null,"subject":"[PATCH] t1400-update-ref: set VISUAL=true as well as EDITOR=true","fromName":"Eric Wong","fromEmail":"normalperson@yhbt.net","sentAt":"2006-07-11T08:41:20Z","receivedAt":"2006-07-11T08:41:20Z","isPatch":true,"sender":{"key":"e@80x24.org","avatar":null},"body":"I have VISUAL set in my environment, and it caused git-commit to\nspawn my editor during the test.\n\nSigned-off-by: Eric Wong <normalperson@yhbt.net>\n---\n t/t1400-update-ref.sh |    2 +-\n 1 files changed, 1 insertions(+), 1 deletions(-)\n\ndiff --git a/t/t1400-update-ref.sh b/t/t1400-update-ref.sh\nindex 6a3515d..4f5b6bd 100755\n--- a/t/t1400-update-ref.sh\n+++ b/t/t1400-update-ref.sh\n@@ -190,7 +190,7 @@ test_expect_success \\\n \t GIT_COMMITTER_DATE=\"2005-05-26 23:41\" git-commit -F M -a &&\n \t h_OTHER=$(git-rev-parse --verify HEAD) &&\n \t echo FIXED >F &&\n-\t EDITOR=true \\\n+\t EDITOR=true VISUAL=true \\\n \t GIT_AUTHOR_DATE=\"2005-05-26 23:44\" \\\n \t GIT_COMMITTER_DATE=\"2005-05-26 23:44\" git-commit --amend &&\n \t h_FIXED=$(git-rev-parse --verify HEAD) &&\n-- \n1.4.1.g710d\n"},{"id":"23626","messageId":"7vlkr04i4p.fsf@assigned-by-dhcp.cox.net","threadId":"4847","inReplyTo":"11526072802855-git-send-email-normalperson@yhbt.net","subject":"Re: [PATCH] t1400-update-ref: set VISUAL=true as well as EDITOR=true","fromName":"Junio C Hamano","fromEmail":"junkio@cox.net","sentAt":"2006-07-11T09:15:34Z","receivedAt":"2006-07-11T09:15:34Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Eric Wong <normalperson@yhbt.net> writes:\n\n> I have VISUAL set in my environment, and it caused git-commit to\n> spawn my editor during the test.\n\nI think it would be better to remove \"EDITOR=: VISUAL=:\"\nsettings from annotate-tests.sh, t1400-update-ref.sh and\nt4013-diff-various.sh, and move that to test-lib.sh; there is no\npoint overriding them differently in each of these automated\ntests.\n"},{"id":"23653","messageId":"20060711190154.GA28468@soma","threadId":"4847","inReplyTo":"7vlkr04i4p.fsf@assigned-by-dhcp.cox.net","subject":"[PATCH] tests: Set EDITOR=: and VISUAL=: globally","fromName":"Eric Wong","fromEmail":"normalperson@yhbt.net","sentAt":"2006-07-11T19:01:54Z","receivedAt":"2006-07-11T19:01:54Z","isPatch":true,"sender":{"key":"e@80x24.org","avatar":null},"body":"This way we don't have to remember to set it for each test; and\nif we forget, we won't cause interactive editors to be spawned\nfor non-interactive tests.\n\nSigned-off-by: Eric Wong <normalperson@yhbt.net>\n---\n Junio C Hamano <junkio@cox.net> wrote:\n > Eric Wong <normalperson@yhbt.net> writes:\n > \n > > I have VISUAL set in my environment, and it caused git-commit to\n > > spawn my editor during the test.\n > \n > I think it would be better to remove \"EDITOR=: VISUAL=:\"\n > settings from annotate-tests.sh, t1400-update-ref.sh and\n > t4013-diff-various.sh, and move that to test-lib.sh; there is no\n > point overriding them differently in each of these automated\n > tests.\n\n I've been under the impression this has already been set, but it turns\n it that was only the case in my config.mak on a different machine :)\n \n t/annotate-tests.sh     |    2 +-\n t/t1400-update-ref.sh   |    1 -\n t/t4013-diff-various.sh |    2 +-\n t/test-lib.sh           |    3 +++\n 4 files changed, 5 insertions(+), 3 deletions(-)\n\ndiff --git a/t/annotate-tests.sh b/t/annotate-tests.sh\nindex 1148b02..b6a2edd 100644\n--- a/t/annotate-tests.sh\n+++ b/t/annotate-tests.sh\n@@ -94,7 +94,7 @@ test_expect_success \\\n test_expect_success \\\n     'merge-setup part 4' \\\n     'echo \"evil merge.\" >>file &&\n-     EDITOR=: VISUAL=: git commit -a --amend'\n+     git commit -a --amend'\n \n test_expect_success \\\n     'Two lines blamed on A, one on B, two on B1, one on B2, one on A U Thor' \\\ndiff --git a/t/t1400-update-ref.sh b/t/t1400-update-ref.sh\nindex 6a3515d..04fab26 100755\n--- a/t/t1400-update-ref.sh\n+++ b/t/t1400-update-ref.sh\n@@ -190,7 +190,6 @@ test_expect_success \\\n \t GIT_COMMITTER_DATE=\"2005-05-26 23:41\" git-commit -F M -a &&\n \t h_OTHER=$(git-rev-parse --verify HEAD) &&\n \t echo FIXED >F &&\n-\t EDITOR=true \\\n \t GIT_AUTHOR_DATE=\"2005-05-26 23:44\" \\\n \t GIT_COMMITTER_DATE=\"2005-05-26 23:44\" git-commit --amend &&\n \t h_FIXED=$(git-rev-parse --verify HEAD) &&\ndiff --git a/t/t4013-diff-various.sh b/t/t4013-diff-various.sh\nindex 06837d1..36658fb 100755\n--- a/t/t4013-diff-various.sh\n+++ b/t/t4013-diff-various.sh\n@@ -70,7 +70,7 @@ test_expect_success setup '\n \tfor i in 1 2; do echo $i; done >>dir/sub &&\n \tgit update-index file0 dir/sub &&\n \n-\tEDITOR=: VISUAL=: git commit --amend &&\n+\tgit commit --amend &&\n \tgit show-branch\n '\n \ndiff --git a/t/test-lib.sh b/t/test-lib.sh\nindex 05f6e79..b0d7990 100755\n--- a/t/test-lib.sh\n+++ b/t/test-lib.sh\n@@ -9,6 +9,8 @@ LC_ALL=C\n PAGER=cat\n TZ=UTC\n export LANG LC_ALL PAGER TZ\n+EDITOR=:\n+VISUAL=:\n unset AUTHOR_DATE\n unset AUTHOR_EMAIL\n unset AUTHOR_NAME\n@@ -30,6 +32,7 @@ unset SHA1_FILE_DIRECTORIES\n unset SHA1_FILE_DIRECTORY\n export GIT_AUTHOR_EMAIL GIT_AUTHOR_NAME\n export GIT_COMMITTER_EMAIL GIT_COMMITTER_NAME\n+export EDITOR VISUAL\n \n # Each test should start with something like this, after copyright notices:\n #\n-- \n1.4.1.g710d\n"}]}