From: Jay Soffian <jaysoffian@gmail.com>
To: git@vger.kernel.org
Cc: Jay Soffian <jaysoffian@gmail.com>,
Junio C Hamano <gitster@pobox.com>,
Brandon Casey <casey@nrlssc.navy.mil>,
Johannes Schindelin <johannes.schindelin@gmx.de>,
Wincent Colaiuta <win@wincent.com>,
Thomas Rast <trast@student.ethz.ch>
Subject: [PATCH v2] test suite: correct export var=val usage
Date: Wed, 18 Feb 2009 15:55:15 -0500 [thread overview]
Message-ID: <1234990515-1636-1-git-send-email-jaysoffian@gmail.com> (raw)
In-Reply-To: <7vr61w3dug.fsf@gitster.siamese.dyndns.org>
Some shells do not like "export var=val", and the right way to write
these is to do an usual assignment and then export just variable names.
Also corrects a typo in the tests added by 94859732 and noticed by
Brandon Casey (gmane 110412):
test_expect_success 'refusing to edit in refs/heads/' '
(MSG=1 GIT_NOTES_REF=refs/heads/bogus &&
export MSG= GIT_NOTES_REF=refs/heads/bogus &&
test_must_fail git notes edit)
'
test_expect_success 'refusing to edit in refs/remotes/' '
(MSG=1 GIT_NOTES_REF=refs/remotes/bogus &&
export MSG= GIT_NOTES_REF=refs/heads/bogus &&
test_must_fail git notes edit)
'
Notice the 'export' lines. Comparing it to Thomas's v2 5/5 patch, it
looks like the first line which sets the variables is correct and
the export line should just be 'export MSG GIT_NOTES_REF' in both
tests.
Signed-off-by: Jay Soffian <jaysoffian@gmail.com>
---
This time with a better (I hope...) commit message to clarify
that we are fixing a typo and not introducing one.
t/t3301-notes.sh | 4 ++--
t/t3302-notes-index-expensive.sh | 4 ++--
t/t9301-fast-export.sh | 4 ++--
t/test-lib.sh | 2 +-
4 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/t/t3301-notes.sh b/t/t3301-notes.sh
index 2321316..18c4eb6 100755
--- a/t/t3301-notes.sh
+++ b/t/t3301-notes.sh
@@ -39,13 +39,13 @@ test_expect_success 'need valid notes ref' '
test_expect_success 'refusing to edit in refs/heads/' '
(MSG=1 GIT_NOTES_REF=refs/heads/bogus &&
- export MSG= GIT_NOTES_REF=refs/heads/bogus &&
+ export MSG GIT_NOTES_REF &&
test_must_fail git notes edit)
'
test_expect_success 'refusing to edit in refs/remotes/' '
(MSG=1 GIT_NOTES_REF=refs/remotes/bogus &&
- export MSG= GIT_NOTES_REF=refs/heads/bogus &&
+ export MSG GIT_NOTES_REF &&
test_must_fail git notes edit)
'
diff --git a/t/t3302-notes-index-expensive.sh b/t/t3302-notes-index-expensive.sh
index 00d27bf..0ef3e95 100755
--- a/t/t3302-notes-index-expensive.sh
+++ b/t/t3302-notes-index-expensive.sh
@@ -29,7 +29,7 @@ create_repo () {
done &&
git update-ref refs/heads/master $commit &&
{
- export GIT_INDEX_FILE=.git/temp;
+ GIT_INDEX_FILE=.git/temp; export GIT_INDEX_FILE;
git rev-list HEAD | cat -n | sed "s/^[ ][ ]*/ /g" |
while read nr sha1; do
blob=$(echo note $nr | git hash-object -w --stdin) &&
@@ -63,7 +63,7 @@ cat > time_notes << \EOF
while [ $i -lt $2 ]; do
case $1 in
no-notes)
- export GIT_NOTES_REF=non-existing
+ GIT_NOTES_REF=non-existing; export GIT_NOTES_REF
;;
notes)
unset GIT_NOTES_REF
diff --git a/t/t9301-fast-export.sh b/t/t9301-fast-export.sh
index 9985721..86c3760 100755
--- a/t/t9301-fast-export.sh
+++ b/t/t9301-fast-export.sh
@@ -185,8 +185,8 @@ test_expect_success 'submodule fast-export | fast-import' '
'
-export GIT_AUTHOR_NAME='A U Thor'
-export GIT_COMMITTER_NAME='C O Mitter'
+GIT_AUTHOR_NAME='A U Thor'; export GIT_AUTHOR_NAME
+GIT_COMMITTER_NAME='C O Mitter'; export GIT_COMMITTER_NAME
test_expect_success 'setup copies' '
diff --git a/t/test-lib.sh b/t/test-lib.sh
index 2021446..7a847ec 100644
--- a/t/test-lib.sh
+++ b/t/test-lib.sh
@@ -98,7 +98,7 @@ do
-i|--i|--im|--imm|--imme|--immed|--immedi|--immedia|--immediat|--immediate)
immediate=t; shift ;;
-l|--l|--lo|--lon|--long|--long-|--long-t|--long-te|--long-tes|--long-test|--long-tests)
- export GIT_TEST_LONG=t; shift ;;
+ GIT_TEST_LONG=t; export GIT_TEST_LONG; shift ;;
-h|--h|--he|--hel|--help)
help=t; shift ;;
-v|--v|--ve|--ver|--verb|--verbo|--verbos|--verbose)
--
1.6.2.rc1.218.g1b4fab
next prev parent reply other threads:[~2009-02-18 20:56 UTC|newest]
Thread overview: 47+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-02-14 19:15 [PATCH 1/4] notes: only clean up message file when editing Thomas Rast
2009-02-14 19:15 ` [PATCH 2/4] notes: use GIT_EDITOR and core.editor over VISUAL/EDITOR Thomas Rast
2009-02-14 19:29 ` Johannes Schindelin
2009-02-14 19:15 ` [PATCH 3/4] t3301: fix confusing test for valid notes ref Thomas Rast
2009-02-14 19:32 ` Johannes Schindelin
2009-02-14 19:15 ` [PATCH 4/4] notes: refuse to edit notes outside refs/notes/ Thomas Rast
2009-02-14 19:33 ` Johannes Schindelin
2009-02-14 19:56 ` Thomas Rast
2009-02-14 20:23 ` [PATCH v2 1/5] notes: only clean up message file when editing Thomas Rast
2009-02-15 7:54 ` Junio C Hamano
2009-02-14 20:23 ` [PATCH v2 2/5] notes: use GIT_EDITOR and core.editor over VISUAL/EDITOR Thomas Rast
2009-02-14 20:23 ` [PATCH v2 3/5] t3301: fix confusing quoting in test for valid notes ref Thomas Rast
2009-02-14 20:23 ` [PATCH v2 4/5] t3301: use test_must_fail instead of ! Thomas Rast
2009-02-14 21:26 ` Johannes Schindelin
2009-02-15 7:52 ` Junio C Hamano
2009-02-15 16:11 ` Thomas Rast
2009-02-15 18:18 ` Jeff King
2009-02-15 22:07 ` Thomas Rast
2009-02-17 9:29 ` Mike Ralphson
2009-02-17 16:34 ` Jeff King
2009-02-17 18:00 ` Mike Ralphson
2009-02-17 20:27 ` Jeff King
2009-02-18 6:41 ` Jeff King
2009-02-18 10:14 ` Johannes Schindelin
2009-02-18 10:16 ` Jeff King
2009-02-18 11:53 ` Johannes Schindelin
2009-02-19 0:37 ` Jeff King
2009-02-19 0:46 ` Johannes Schindelin
2009-02-19 0:46 ` Jeff King
2009-02-17 8:44 ` Thomas Rast
2009-02-17 8:46 ` Thomas Rast
2009-02-17 16:56 ` Brandon Casey
2009-02-17 22:20 ` Junio C Hamano
2009-02-17 22:53 ` [PATCH] test suite: correct export var=val usage Jay Soffian
2009-02-17 23:47 ` Johannes Schindelin
2009-02-18 0:37 ` Jay Soffian
2009-02-17 22:54 ` Jay Soffian
2009-02-17 22:57 ` Jay Soffian
2009-02-18 10:06 ` Wincent Colaiuta
2009-02-18 13:19 ` Jay Soffian
2009-02-18 13:29 ` Jay Soffian
2009-02-18 13:34 ` Johannes Schindelin
2009-02-18 16:56 ` Wincent Colaiuta
2009-02-18 17:05 ` Thomas Rast
2009-02-18 20:55 ` Jay Soffian [this message]
2009-02-14 20:23 ` [PATCH v2 5/5] notes: refuse to edit notes outside refs/notes/ Thomas Rast
2009-02-14 19:29 ` [PATCH 1/4] notes: only clean up message file when editing Johannes Schindelin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1234990515-1636-1-git-send-email-jaysoffian@gmail.com \
--to=jaysoffian@gmail.com \
--cc=casey@nrlssc.navy.mil \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=johannes.schindelin@gmx.de \
--cc=trast@student.ethz.ch \
--cc=win@wincent.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).