On Mon, Oct 05, 2020 at 01:09:30AM -0700, Jonathan Nieder wrote: > > I note that neither these new tests nor the existing .gitmodules ones > > confirm that we catch the obscured ntfs/hfs forms in the actual code > > paths (instead, we feed them to a synthetic test-tool helper in t0060). > > I think that's OK, but if we wanted to be super-paranoid we could beef > > up these tests with trickier names. > > I think being exhaustive wouldn't be worth it, but perhaps *one* > example (e.g., ".gitmodules ") would not be a terrible idea. It wasn't _too_ bad to extract these tests into a function, at which point it was easy to test one filename of each type. That will be in my v2. > > +test_expect_success 'refuse to load symlinked .gitattributes into index' ' > > + test_must_fail git -C symlink-attr read-tree $tree 2>err && > > + test_i18ngrep "invalid path.*gitattributes" err > > This tests that it fails but doesn't test that it had no effect. > Would that be straightforward to check as well (e.g. an "ls-files -s" > before and after)? Yeah, "ls-files" should be empty afterwards (we've never added anything to the index during the creation steps). That was easy enough to add. -Peff