summaryrefslogtreecommitdiff
path: root/utf8.h
diff options
context:
space:
mode:
authorJeff King <peff@peff.net>2018-05-02 15:23:45 -0400
committerJeff King <peff@peff.net>2018-05-21 23:50:11 -0400
commit0fc333ba20b43a8afee5023e92cb3384ff4e59a6 (patch)
tree6b300f5e1f0a0b3b9e0b305c96cd8cfd3033ad5b /utf8.h
parent11a9f4d807a0d71dc6eff51bb87baf4ca2cccf1d (diff)
downloadgit-0fc333ba20b43a8afee5023e92cb3384ff4e59a6.tar.gz
is_hfs_dotgit: match other .git files
Both verify_path() and fsck match ".git", ".GIT", and other variants specific to HFS+. Let's allow matching other special files like ".gitmodules", which we'll later use to enforce extra restrictions via verify_path() and fsck. Signed-off-by: Jeff King <peff@peff.net>
Diffstat (limited to 'utf8.h')
-rw-r--r--utf8.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/utf8.h b/utf8.h
index 6bbcf31a83..da19b43114 100644
--- a/utf8.h
+++ b/utf8.h
@@ -52,8 +52,13 @@ int mbs_chrlen(const char **text, size_t *remainder_p, const char *encoding);
* The path should be NUL-terminated, but we will match variants of both ".git\0"
* and ".git/..." (but _not_ ".../.git"). This makes it suitable for both fsck
* and verify_path().
+ *
+ * Likewise, the is_hfs_dotgitfoo() variants look for ".gitfoo".
*/
int is_hfs_dotgit(const char *path);
+int is_hfs_dotgitmodules(const char *path);
+int is_hfs_dotgitignore(const char *path);
+int is_hfs_dotgitattributes(const char *path);
typedef enum {
ALIGN_LEFT,