summaryrefslogtreecommitdiff
path: root/utf8.h
diff options
context:
space:
mode:
authorLibravatar Junio C Hamano <gitster@pobox.com>2014-12-17 11:11:15 -0800
committerLibravatar Junio C Hamano <gitster@pobox.com>2014-12-17 11:11:15 -0800
commit2aa910084681a6cbfb0928b2d9c4d0f9ce54e1b8 (patch)
tree1aeb9ab0f337c278560d7ea72deb21f9c5e45de7 /utf8.h
parentgit-tag.txt: Add a missing hyphen to `-s` (diff)
parentfsck: complain about NTFS ".git" aliases in trees (diff)
downloadtgif-2aa910084681a6cbfb0928b2d9c4d0f9ce54e1b8.tar.xz
Merge branch 'dotgit-case-maint-1.8.5' into maint-1.8.5
* dotgit-case-maint-1.8.5: fsck: complain about NTFS ".git" aliases in trees read-cache: optionally disallow NTFS .git variants path: add is_ntfs_dotgit() helper fsck: complain about HFS+ ".git" aliases in trees read-cache: optionally disallow HFS+ .git variants utf8: add is_hfs_dotgit() helper fsck: notice .git case-insensitively t1450: refactor ".", "..", and ".git" fsck tests verify_dotfile(): reject .git case-insensitively read-tree: add tests for confusing paths like ".." and ".git" unpack-trees: propagate errors adding entries to the index
Diffstat (limited to 'utf8.h')
-rw-r--r--utf8.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/utf8.h b/utf8.h
index 65d0e42b96..e4d9183c5f 100644
--- a/utf8.h
+++ b/utf8.h
@@ -42,4 +42,12 @@ static inline char *reencode_string(const char *in,
int mbs_chrlen(const char **text, size_t *remainder_p, const char *encoding);
+/*
+ * Returns true if the the path would match ".git" after HFS case-folding.
+ * 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().
+ */
+int is_hfs_dotgit(const char *path);
+
#endif