Skip to content

Commit e656fc9

Browse files
committed
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 <[email protected]>
1 parent 61d8660 commit e656fc9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

t/test-lib.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -201,7 +201,7 @@ test_tick () {
201201
# Both <file> and <contents> default to <message>.
202202

203203
test_commit () {
204-
file=${2:-$(echo "$1" | tr 'A-Z' 'a-z')}
204+
file=${2:-"$1.t"}
205205
echo "${3-$1}" > "$file" &&
206206
git add "$file" &&
207207
test_tick &&

0 commit comments

Comments
 (0)