summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: f573571)
raw | patch | inline | side by side (parent: f573571)
author | Jon Seymour <jon.seymour@gmail.com> | |
Thu, 7 Jul 2005 00:50:07 +0000 (10:50 +1000) | ||
committer | Linus Torvalds <torvalds@g5.osdl.org> | |
Thu, 7 Jul 2005 01:00:28 +0000 (18:00 -0700) |
When sed uses \n rather than ; as a separator (for BSD sed(1) compat),
it is cleaner to use a file directly, rather than an environment
variable containing \n characters.
This change changes t/t6000 write to sed.script directly and changes
the other tests to remove knowledge of sed.script.
Signed-off-by: Jon Seymour <jon.seymour@gmail.com>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
it is cleaner to use a file directly, rather than an environment
variable containing \n characters.
This change changes t/t6000 write to sed.script directly and changes
the other tests to remove knowledge of sed.script.
Signed-off-by: Jon Seymour <jon.seymour@gmail.com>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
t/t6000-lib.sh | patch | blob | history | |
t/t6001-rev-list-merge-order.sh | patch | blob | history | |
t/t6002-rev-list-bisect.sh | patch | blob | history | |
t/t6003-rev-list-topo-order.sh | patch | blob | history |
diff --git a/t/t6000-lib.sh b/t/t6000-lib.sh
index 377e8eb77b62a3779481c817432027346f3f0259..01f796e9c827aff02c3161ac940626dd4d8edb9b 100644 (file)
--- a/t/t6000-lib.sh
+++ b/t/t6000-lib.sh
[ -d .git/refs/tags ] || mkdir -p .git/refs/tags
-sed_script="";
+:> sed.script
# Answer the sha1 has associated with the tag. The tag must exist in .git or .git/refs/tags
tag()
}
# Save the output of a command into the tag specified. Prepend
-# a substitution script for the tag onto the front of $sed_script
+# a substitution script for the tag onto the front of sed.script
save_tag()
{
_tag=$1
shift 1
"$@" >.git/refs/tags/$_tag
- sed_script="s/$(tag $_tag)/$_tag/g
-$sed_script"
+ echo "s/$(tag $_tag)/$_tag/g" > sed.script.tmp
+ cat sed.script >> sed.script.tmp
+ rm sed.script
+ mv sed.script.tmp sed.script
}
# Replace unhelpful sha1 hashses with their symbolic equivalents
entag()
{
- sed "$sed_script"
+ sed -f sed.script
}
# Execute a command after first saving, then setting the GIT_AUTHOR_EMAIL
index fdd5155147ef011b4808467c7ff1c4804a1e9ee8..66bd9ca8df266d2efe7d3d8296042c87a04c26b5 100755 (executable)
tag l5 > .git/HEAD
-#
-# cd to t/trash and use
-#
-# git-rev-list ... 2>&1 | sed "$(cat sed.script)"
-#
-# if you ever want to manually debug the operation of git-rev-list
-#
-echo $sed_script > sed.script
-
test_expect_success 'rev-list has correct number of entries' 'git-rev-list HEAD | wc -l | tr -s " "' <<EOF
19
EOF
index dde5d865ba98e9cce266c9cae406bada7143fd30..a5e313b2f9812a75223df2b54af14383829e3e9a 100755 (executable)
@@ -113,16 +113,6 @@ on_committer_date "1971-08-16 00:00:04" save_tag u4 unique_commit u4 tree -p u0
on_committer_date "1971-08-16 00:00:05" save_tag u5 unique_commit u5 tree -p u0
on_committer_date "1971-08-16 00:00:06" save_tag V unique_commit V tree -p u1 -p u2 -p u3 -p u4 -p u5
-
-#
-# cd to t/trash and use
-#
-# git-rev-list ... 2>&1 | sed "$(cat sed.script)"
-#
-# if you ever want to manually debug the operation of git-rev-list
-#
-echo $sed_script > sed.script
-
test_sequence()
{
_bisect_option=$1
index a94dbd2031de884a080e1657473be3a8212f9682..98c5e2faea1d92e60f23a895b736a4716cd3fa0c 100755 (executable)
tag l5 > .git/HEAD
-#
-# cd to t/trash and use
-#
-# git-rev-list ... 2>&1 | sed "$(cat sed.script)"
-#
-# if you ever want to manually debug the operation of git-rev-list
-#
-echo "$sed_script" | tr ' ' \\012 > sed.script
-
test_expect_success 'rev-list has correct number of entries' 'git-rev-list HEAD | wc -l | tr -s " "' <<EOF
19
EOF