aboutsummaryrefslogtreecommitdiff
path: root/t/test-lib.sh
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2009-02-03 21:46:33 -0800
committerJunio C Hamano <gitster@pobox.com>2009-02-03 21:50:47 -0800
commite656fc97a2be4586bfef25714d588f002d2605a2 (patch)
tree02231246447c9e6a0530a09cabd7f6b04a1f7a9d /t/test-lib.sh
parent61d86605dd78f0ac9150e1fc9b99d87d2410e37b (diff)
downloadgit-e656fc97a2be4586bfef25714d588f002d2605a2.tar.gz
git-e656fc97a2be4586bfef25714d588f002d2605a2.tar.xz
tests: fix test_commit() for case insensitive filesystems
Brian Gernhardt noticed that t3411 was broken recently on case insensitive filesystems. 0088496 (test-lib.sh: introduce test_commit() and test_merge() helpers, 2009-01-27) used a tag and a file with the same name, only different in case, and converted many existing tests that needed only a file (or a tag). Some tests may want to refer to a rev or a file, but on a filesystem that loses cases, referring to either without disambiguation mark ("--") on the command line now triggers an error (t3411 was the only one such test). Fix it by using a filename that is different from the tagname each step creates. Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/test-lib.sh')
-rw-r--r--t/test-lib.sh2
1 files changed, 1 insertions, 1 deletions
diff --git a/t/test-lib.sh b/t/test-lib.sh
index c1839f70b..6f6244ab7 100644
--- a/t/test-lib.sh
+++ b/t/test-lib.sh
@@ -201,7 +201,7 @@ test_tick () {
# Both <file> and <contents> default to <message>.
test_commit () {
- file=${2:-$(echo "$1" | tr 'A-Z' 'a-z')}
+ file=${2:-"$1.t"}
echo "${3-$1}" > "$file" &&
git add "$file" &&
test_tick &&