{"thread":{"id":"6141","subject":"[PATCH 1/3] t6024-recursive-merge: quiet down this test","startedAt":"2006-12-28T09:10:49Z","lastAt":"2006-12-28T18:14:49Z","messageCount":6,"participants":["Eric Wong","Junio C Hamano"],"isPatch":true,"patchVersion":1,"patchTotal":3},"messages":[{"id":"30425","messageId":"11672970521665-git-send-email-normalperson@yhbt.net","threadId":"6141","inReplyTo":null,"subject":"quieting down git-commit (and init-db) in tests","fromName":"Eric Wong","fromEmail":"normalperson@yhbt.net","sentAt":"2006-12-28T09:10:49Z","receivedAt":"2006-12-28T09:10:49Z","isPatch":false,"sender":{"key":"e@80x24.org","avatar":null},"body":"There are more places where the tests have gotten, but I noticed these\nthe most.  Some non-portable uses of 'export' have been replaced.\nI'll try to get to the rest in a day or two, but I'm sleepy and have\nmore things for git-svn to do.\n\n--\n t/t6024-recursive-merge.sh     |   90 +++++++++++++++++++++-------------------\n t/t9200-git-cvsexportcommit.sh |   10 +++--\n t/test-lib.sh                  |    2 +-\n 3 files changed, 54 insertions(+), 48 deletions(-)\n\n-- \nEric Wong\n"},{"id":"30424","messageId":"11672970542015-git-send-email-normalperson@yhbt.net","threadId":"6141","inReplyTo":"11672970521665-git-send-email-normalperson@yhbt.net","subject":"[PATCH 1/3] t6024-recursive-merge: quiet down this test","fromName":"Eric Wong","fromEmail":"normalperson@yhbt.net","sentAt":"2006-12-28T09:10:50Z","receivedAt":"2006-12-28T09:10:50Z","isPatch":true,"sender":{"key":"e@80x24.org","avatar":null},"body":"We get an extra measure of error checking here as well.\nWhile we're at it, also removed a less portable use of export.\n\nSigned-off-by: Eric Wong <normalperson@yhbt.net>\n---\n t/t6024-recursive-merge.sh |   90 +++++++++++++++++++++++---------------------\n 1 files changed, 47 insertions(+), 43 deletions(-)\n\ndiff --git a/t/t6024-recursive-merge.sh b/t/t6024-recursive-merge.sh\nindex 69b18f7..31b9625 100644\n--- a/t/t6024-recursive-merge.sh\n+++ b/t/t6024-recursive-merge.sh\n@@ -11,50 +11,54 @@ test_description='Test merge without common ancestors'\n #       X   \\\n # 2 - C - E - G\n \n-export GIT_COMMITTER_DATE=\"2006-12-12 23:28:00 +0100\"\n-echo 1 > a1\n-git add a1\n-GIT_AUTHOR_DATE=\"2006-12-12 23:00:00\" git commit -m 1 a1\n-\n-git checkout -b A master\n-echo A > a1\n-GIT_AUTHOR_DATE=\"2006-12-12 23:00:01\" git commit -m A a1\n-\n-git checkout -b B master\n-echo B > a1\n-GIT_AUTHOR_DATE=\"2006-12-12 23:00:02\" git commit -m B a1\n-\n-git checkout -b D A\n-git-rev-parse B > .git/MERGE_HEAD\n-echo D > a1\n-git update-index a1\n-GIT_AUTHOR_DATE=\"2006-12-12 23:00:03\" git commit -m D\n-\n-git symbolic-ref HEAD refs/heads/other\n-echo 2 > a1\n-GIT_AUTHOR_DATE=\"2006-12-12 23:00:04\" git commit -m 2 a1\n-\n-git checkout -b C\n-echo C > a1\n-GIT_AUTHOR_DATE=\"2006-12-12 23:00:05\" git commit -m C a1\n-\n-git checkout -b E C\n-git-rev-parse B > .git/MERGE_HEAD\n-echo E > a1\n-git update-index a1\n-GIT_AUTHOR_DATE=\"2006-12-12 23:00:06\" git commit -m E\n-\n-git checkout -b G E\n-git-rev-parse A > .git/MERGE_HEAD\n-echo G > a1\n-git update-index a1\n-GIT_AUTHOR_DATE=\"2006-12-12 23:00:07\" git commit -m G\n-\n-git checkout -b F D\n-git-rev-parse C > .git/MERGE_HEAD\n-echo F > a1\n-git update-index a1\n+GIT_COMMITTER_DATE=\"2006-12-12 23:28:00 +0100\"\n+export GIT_COMMITTER_DATE\n+\n+test_expect_success \"setup tests\" '\n+echo 1 > a1 &&\n+git add a1 &&\n+GIT_AUTHOR_DATE=\"2006-12-12 23:00:00\" git commit -m 1 a1 &&\n+\n+git checkout -b A master &&\n+echo A > a1 &&\n+GIT_AUTHOR_DATE=\"2006-12-12 23:00:01\" git commit -m A a1 &&\n+\n+git checkout -b B master &&\n+echo B > a1 &&\n+GIT_AUTHOR_DATE=\"2006-12-12 23:00:02\" git commit -m B a1 &&\n+\n+git checkout -b D A &&\n+git-rev-parse B > .git/MERGE_HEAD &&\n+echo D > a1 &&\n+git update-index a1 &&\n+GIT_AUTHOR_DATE=\"2006-12-12 23:00:03\" git commit -m D &&\n+\n+git symbolic-ref HEAD refs/heads/other &&\n+echo 2 > a1 &&\n+GIT_AUTHOR_DATE=\"2006-12-12 23:00:04\" git commit -m 2 a1 &&\n+\n+git checkout -b C &&\n+echo C > a1 &&\n+GIT_AUTHOR_DATE=\"2006-12-12 23:00:05\" git commit -m C a1 &&\n+\n+git checkout -b E C &&\n+git-rev-parse B > .git/MERGE_HEAD &&\n+echo E > a1 &&\n+git update-index a1 &&\n+GIT_AUTHOR_DATE=\"2006-12-12 23:00:06\" git commit -m E &&\n+\n+git checkout -b G E &&\n+git-rev-parse A > .git/MERGE_HEAD &&\n+echo G > a1 &&\n+git update-index a1 &&\n+GIT_AUTHOR_DATE=\"2006-12-12 23:00:07\" git commit -m G &&\n+\n+git checkout -b F D &&\n+git-rev-parse C > .git/MERGE_HEAD &&\n+echo F > a1 &&\n+git update-index a1 &&\n GIT_AUTHOR_DATE=\"2006-12-12 23:00:08\" git commit -m F\n+'\n \n test_expect_failure \"combined merge conflicts\" \"git merge -m final G\"\n \n-- \n1.4.4.3.gd4ada\n"},{"id":"30427","messageId":"11672970561224-git-send-email-normalperson@yhbt.net","threadId":"6141","inReplyTo":"11672970542015-git-send-email-normalperson@yhbt.net","subject":"[PATCH 2/3] test-lib: quiet down init-db output for tests","fromName":"Eric Wong","fromEmail":"normalperson@yhbt.net","sentAt":"2006-12-28T09:10:51Z","receivedAt":"2006-12-28T09:10:51Z","isPatch":true,"sender":{"key":"e@80x24.org","avatar":null},"body":"I don't think anybody running tests needs to know they're\nrunning init-db and creating a repository for testing.\n\nSigned-off-by: Eric Wong <normalperson@yhbt.net>\n---\n t/test-lib.sh |    2 +-\n 1 files changed, 1 insertions(+), 1 deletions(-)\n\ndiff --git a/t/test-lib.sh b/t/test-lib.sh\nindex f0f9cd6..ad2b6f6 100755\n--- a/t/test-lib.sh\n+++ b/t/test-lib.sh\n@@ -176,7 +176,7 @@ test_create_repo () {\n \trepo=\"$1\"\n \tmkdir \"$repo\"\n \tcd \"$repo\" || error \"Cannot setup test environment\"\n-\t\"$GIT_EXEC_PATH/git\" init-db --template=$GIT_EXEC_PATH/templates/blt/ 2>/dev/null ||\n+\t\"$GIT_EXEC_PATH/git\" init-db --template=$GIT_EXEC_PATH/templates/blt/ >/dev/null 2>&1 ||\n \terror \"cannot run git init-db -- have you built things yet?\"\n \tmv .git/hooks .git/hooks-disabled\n \tcd \"$owd\"\n-- \n1.4.4.3.gd4ada\n"},{"id":"30426","messageId":"11672970581666-git-send-email-normalperson@yhbt.net","threadId":"6141","inReplyTo":"11672970561224-git-send-email-normalperson@yhbt.net","subject":"[PATCH 3/3] t9200-git-cvsexportcommit.sh: quiet down commit","fromName":"Eric Wong","fromEmail":"normalperson@yhbt.net","sentAt":"2006-12-28T09:10:52Z","receivedAt":"2006-12-28T09:10:52Z","isPatch":true,"sender":{"key":"e@80x24.org","avatar":null},"body":"Also, fixed an unportable use of 'export'.\n\nSigned-off-by: Eric Wong <normalperson@yhbt.net>\n---\n t/t9200-git-cvsexportcommit.sh |   10 ++++++----\n 1 files changed, 6 insertions(+), 4 deletions(-)\n\ndiff --git a/t/t9200-git-cvsexportcommit.sh b/t/t9200-git-cvsexportcommit.sh\nindex ca0513b..315119a 100755\n--- a/t/t9200-git-cvsexportcommit.sh\n+++ b/t/t9200-git-cvsexportcommit.sh\n@@ -14,16 +14,18 @@ then\n     exit\n fi\n \n-export CVSROOT=$(pwd)/cvsroot\n-export CVSWORK=$(pwd)/cvswork\n+CVSROOT=$(pwd)/cvsroot\n+CVSWORK=$(pwd)/cvswork\n+GIT_DIR=$(pwd)/.git\n+export CVSROOT CVSWORK GIT_DIR\n+\n rm -rf \"$CVSROOT\" \"$CVSWORK\"\n mkdir \"$CVSROOT\" &&\n cvs init &&\n cvs -Q co -d \"$CVSWORK\" . &&\n-export GIT_DIR=$(pwd)/.git &&\n echo >empty &&\n git add empty &&\n-git commit -a -m \"Initial\" 2>/dev/null ||\n+git commit -q -a -m \"Initial\" 2>/dev/null ||\n exit 1\n \n test_expect_success \\\n-- \n1.4.4.3.gd4ada\n"},{"id":"30433","messageId":"7vfyb0wexo.fsf@assigned-by-dhcp.cox.net","threadId":"6141","inReplyTo":"11672970581666-git-send-email-normalperson@yhbt.net","subject":"Re: [PATCH 3/3] t9200-git-cvsexportcommit.sh: quiet down commit","fromName":"Junio C Hamano","fromEmail":"junkio@cox.net","sentAt":"2006-12-28T09:24:51Z","receivedAt":"2006-12-28T09:24:51Z","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> Also, fixed an unportable use of 'export'.\n\nAs a traditionalist, I tend to prefer \"var=val; export var\" over\n\"export var=val\" myself, but I wonder how unportable this is\nthese days.\n\nJust wondering, no objection.\n\nDo you have a specific shell in mind that groks other constructs\nused in our tests but not \"export var=val\" form?\n"},{"id":"30441","messageId":"20061228181448.GA17775@localdomain","threadId":"6141","inReplyTo":"7vfyb0wexo.fsf@assigned-by-dhcp.cox.net","subject":"Re: [PATCH 3/3] t9200-git-cvsexportcommit.sh: quiet down commit","fromName":"Eric Wong","fromEmail":"normalperson@yhbt.net","sentAt":"2006-12-28T18:14:49Z","receivedAt":"2006-12-28T18:14:49Z","isPatch":true,"sender":{"key":"e@80x24.org","avatar":null},"body":"Junio C Hamano <junkio@cox.net> wrote:\n> Eric Wong <normalperson@yhbt.net> writes:\n> \n> > Also, fixed an unportable use of 'export'.\n> \n> As a traditionalist, I tend to prefer \"var=val; export var\" over\n> \"export var=val\" myself, but I wonder how unportable this is\n> these days.\n> \n> Just wondering, no objection.\n> \n> Do you have a specific shell in mind that groks other constructs\n> used in our tests but not \"export var=val\" form?\n\nI can't remember, and I can't seem to find one, either.  Even posh\n(latest debian unstable) and ash (from woody) seem to support it...\n\nOn a related note, how portable is mkdir -p these days?  I remember\nseeing systems that don't have it, too.\n\n-- \nEric Wong\n"}]}