Michael J Gruber <git@xxxxxxxxxxxxxxxxxxxx> writes: > This mini series provides and makes use of test prerequisites for > case insensitivity, symlinks and unicode conversion. > > SYMLINKS existed before but was not used in t0050. > CASE_INSENSITIVE_FS was defined in t0003 rather than test-lib (and redone in > t0050). > UTF8_NFD_TO_NFC did not exist but was redone in two ways in two tests. > > After this series, all 3 are defined in test-lib and used in the various tests. Consolidating the logic to set necessary prerequisites used in various scripts is very good, but I am not sure adding them to test-lib and run them unconditionally is a good idea. SYMLINKS is used by 47 among 595 tests, which is common enough, but the new ones are not common enough. I do not think we want to create a temporary "junk" dir, two temporary "camelcase" files, read and compare them, when nobody in the script cares. We do not have to split them into separate include files, though, in order to avoid such waste. Instead, you can make the logic to set prerequisite conditional inside test-lib.sh and update the users. Something like: (in t/test-lib.sh) case ",$TEST_WANT_PREREQ," in *,CASE_INSENSITIVE_FS,*) mkdir junk && echo good >junk/CamelCase && echo bad >junk/camelcase && test "$(cat junk/CamelCase)" == good || test_set_prereq CASE_INSENSITIVE_FS rm -fr junk esac (at the beginning of t/t0003-attributes.sh) #!/bin/sh test_description=gitattributes TEST_WANT_PREREQ=CASE_INSENSITIVE_FS,SYMLINKS . ./test-lib.sh Thanks. -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html