summaryrefslogtreecommitdiff
path: root/dir.h
diff options
context:
space:
mode:
authorJoshua Jensen <jjensen@workspacewhiz.com>2010-10-03 09:56:41 +0000
committerJunio C Hamano <gitster@pobox.com>2010-10-06 11:19:58 -0700
commit8cf2a84e9d6adcfc42dadfe4ec2f9bdbb0cdb59b (patch)
tree798d8e86310fb6c37fc4017b68bf39713bb7d228 /dir.h
parent4de066b6f12a17b2b4d3206ee66efb251e1cdd29 (diff)
downloadgit-8cf2a84e9d6adcfc42dadfe4ec2f9bdbb0cdb59b.tar.gz
Add string comparison functions that respect the ignore_case variable.
Multiple locations within this patch series alter a case sensitive string comparison call such as strcmp() to be a call to a string comparison call that selects case comparison based on the global ignore_case variable. Behaviorally, when core.ignorecase=false, the *_icase() versions are functionally equivalent to their C runtime counterparts. When core.ignorecase=true, the *_icase() versions perform a case insensitive comparison. Like Linus' earlier ignorecase patch, these may ignore filename conventions on certain file systems. By isolating filename comparisons to certain functions, support for those filename conventions may be more easily met. Signed-off-by: Joshua Jensen <jjensen@workspacewhiz.com> Signed-off-by: Johannes Sixt <j6t@kdbg.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'dir.h')
-rw-r--r--dir.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/dir.h b/dir.h
index 278d84cdf7..b3e2104b9f 100644
--- a/dir.h
+++ b/dir.h
@@ -101,4 +101,8 @@ extern int remove_dir_recursively(struct strbuf *path, int flag);
/* tries to remove the path with empty directories along it, ignores ENOENT */
extern int remove_path(const char *path);
+extern int strcmp_icase(const char *a, const char *b);
+extern int strncmp_icase(const char *a, const char *b, size_t count);
+extern int fnmatch_icase(const char *pattern, const char *string, int flags);
+
#endif