{"thread":{"id":"42106","subject":"[PATCH 1/2] dir.c: remove dead function fnmatch_icase()","startedAt":"2016-04-22T12:25:15Z","lastAt":"2016-04-22T12:25:16Z","messageCount":2,"participants":["Nguyễn Thái Ngọc Duy"],"isPatch":true,"patchVersion":1,"patchTotal":2},"messages":[{"id":"284110","messageId":"1461327916-3575-1-git-send-email-pclouds@gmail.com","threadId":"42106","inReplyTo":null,"subject":"[PATCH 1/2] dir.c: remove dead function fnmatch_icase()","fromName":"Nguyễn Thái Ngọc Duy","fromEmail":"pclouds@gmail.com","sentAt":"2016-04-22T12:25:15Z","receivedAt":"2016-04-22T12:25:15Z","isPatch":true,"sender":{"key":"pclouds@gmail.com","avatar":"https://avatars.githubusercontent.com/u/720?v=4"},"body":"It was largely replaced by fnmatch_icase_mem() and its last use was in\n84b8b5d (remove match_pathspec() in favor of match_pathspec_depth() -\n2013-07-14).\n\nSigned-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>\n---\n dir.c | 7 -------\n dir.h | 1 -\n 2 files changed, 8 deletions(-)\n\ndiff --git a/dir.c b/dir.c\nindex 996653b..656f272 100644\n--- a/dir.c\n+++ b/dir.c\n@@ -64,13 +64,6 @@ int strncmp_icase(const char *a, const char *b, size_t count)\n \treturn ignore_case ? strncasecmp(a, b, count) : strncmp(a, b, count);\n }\n \n-int fnmatch_icase(const char *pattern, const char *string, int flags)\n-{\n-\treturn wildmatch(pattern, string,\n-\t\t\t flags | (ignore_case ? WM_CASEFOLD : 0),\n-\t\t\t NULL);\n-}\n-\n int git_fnmatch(const struct pathspec_item *item,\n \t\tconst char *pattern, const char *string,\n \t\tint prefix)\ndiff --git a/dir.h b/dir.h\nindex 301b737..d56d2fb 100644\n--- a/dir.h\n+++ b/dir.h\n@@ -272,7 +272,6 @@ extern int remove_path(const char *path);\n \n extern int strcmp_icase(const char *a, const char *b);\n extern int strncmp_icase(const char *a, const char *b, size_t count);\n-extern int fnmatch_icase(const char *pattern, const char *string, int flags);\n \n /*\n  * The prefix part of pattern must not contains wildcards.\n-- \n2.8.0.rc0.210.gd302cd2\n"},{"id":"284111","messageId":"1461327916-3575-2-git-send-email-pclouds@gmail.com","threadId":"42106","inReplyTo":"1461327916-3575-1-git-send-email-pclouds@gmail.com","subject":"[PATCH 2/2] wrapper.c: delete dead function git_mkstemps()","fromName":"Nguyễn Thái Ngọc Duy","fromEmail":"pclouds@gmail.com","sentAt":"2016-04-22T12:25:16Z","receivedAt":"2016-04-22T12:25:16Z","isPatch":true,"sender":{"key":"pclouds@gmail.com","avatar":"https://avatars.githubusercontent.com/u/720?v=4"},"body":"Its last call site was replaced by mks_tempfile_ts() in 284098f (diff:\nuse tempfile module - 2015-08-12) and there's a good chance\nmks_tempfile_ts will continue to successfully handle this job. Delete\nit.\n\nSigned-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>\n---\n cache.h   |  2 --\n wrapper.c | 17 -----------------\n 2 files changed, 19 deletions(-)\n\ndiff --git a/cache.h b/cache.h\nindex 2711048..fd728f0 100644\n--- a/cache.h\n+++ b/cache.h\n@@ -958,8 +958,6 @@ static inline int is_empty_blob_sha1(const unsigned char *sha1)\n \n int git_mkstemp(char *path, size_t n, const char *template);\n \n-int git_mkstemps(char *path, size_t n, const char *template, int suffix_len);\n-\n /* set default permissions by passing mode arguments to open(2) */\n int git_mkstemps_mode(char *pattern, int suffix_len, int mode);\n int git_mkstemp_mode(char *pattern, int mode);\ndiff --git a/wrapper.c b/wrapper.c\nindex 9afc1a0..9009f8b 100644\n--- a/wrapper.c\n+++ b/wrapper.c\n@@ -446,23 +446,6 @@ int git_mkstemp(char *path, size_t len, const char *template)\n \treturn mkstemp(path);\n }\n \n-/* git_mkstemps() - create tmp file with suffix honoring TMPDIR variable. */\n-int git_mkstemps(char *path, size_t len, const char *template, int suffix_len)\n-{\n-\tconst char *tmp;\n-\tsize_t n;\n-\n-\ttmp = getenv(\"TMPDIR\");\n-\tif (!tmp)\n-\t\ttmp = \"/tmp\";\n-\tn = snprintf(path, len, \"%s/%s\", tmp, template);\n-\tif (len <= n) {\n-\t\terrno = ENAMETOOLONG;\n-\t\treturn -1;\n-\t}\n-\treturn mkstemps(path, suffix_len);\n-}\n-\n /* Adapted from libiberty's mkstemp.c. */\n \n #undef TMP_MAX\n-- \n2.8.0.rc0.210.gd302cd2\n"}]}