t0060: test ntfs/hfs-obscured dotfiles
We have tests that cover various filesystem-specific spellings of ".gitmodules", because we need to reliably identify that path for some security checks. These are fromdc2d9ba318
(is_{hfs,ntfs}_dotgitmodules: add tests, 2018-05-12), with the actual code coming frome7cb0b4455
(is_ntfs_dotgit: match other .git files, 2018-05-11) and0fc333ba20
(is_hfs_dotgit: match other .git files, 2018-05-02). Those latter two commits also added similar matching functions for .gitattributes and .gitignore. These ended up not being used in the final series, and are currently dead code. But in preparation for them being used in some fsck checks, let's make sure they actually work by throwing a few basic tests at them. Likewise, let's cover .mailmap (which does need matching code added). I didn't bother with the whole battery of tests that we cover for .gitmodules. These functions are all based on the same generic matcher, so it's sufficient to test most of the corner cases just once. Note that the ntfs magic prefix names in the tests come from the algorithm described ine7cb0b4455
(and are different for each file). Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:

committed by
Junio C Hamano

parent
1cb12f3339
commit
801ed010bf
1
cache.h
1
cache.h
@ -1271,6 +1271,7 @@ int is_ntfs_dotgit(const char *name);
|
||||
int is_ntfs_dotgitmodules(const char *name);
|
||||
int is_ntfs_dotgitignore(const char *name);
|
||||
int is_ntfs_dotgitattributes(const char *name);
|
||||
int is_ntfs_dotmailmap(const char *name);
|
||||
|
||||
/*
|
||||
* Returns true iff "str" could be confused as a command-line option when
|
||||
|
Reference in New Issue
Block a user