summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2016-05-03 14:08:13 -0700
committerJunio C Hamano <gitster@pobox.com>2016-05-03 14:08:13 -0700
commit51a92bf5478025f236034ce881d12193a6fc4127 (patch)
tree4705098e80545be4c7b0a1a107c0e703e9734ae9
parent309ca68e5a11f14491f1b5ad9b0b3384ac4df383 (diff)
parent659488326cf6a170cd474e66f1bed6f5bc322eab (diff)
downloadgit-51a92bf5478025f236034ce881d12193a6fc4127.tar.gz
Merge branch 'nd/remove-unused'
Code cleanup. * nd/remove-unused: wrapper.c: delete dead function git_mkstemps() dir.c: remove dead function fnmatch_icase()
-rw-r--r--cache.h2
-rw-r--r--dir.c7
-rw-r--r--dir.h1
-rw-r--r--wrapper.c17
4 files changed, 0 insertions, 27 deletions
diff --git a/cache.h b/cache.h
index 2711048cad..fd728f0793 100644
--- a/cache.h
+++ b/cache.h
@@ -958,8 +958,6 @@ static inline int is_empty_blob_sha1(const unsigned char *sha1)
int git_mkstemp(char *path, size_t n, const char *template);
-int git_mkstemps(char *path, size_t n, const char *template, int suffix_len);
-
/* set default permissions by passing mode arguments to open(2) */
int git_mkstemps_mode(char *pattern, int suffix_len, int mode);
int git_mkstemp_mode(char *pattern, int mode);
diff --git a/dir.c b/dir.c
index 996653b0d3..656f272adc 100644
--- a/dir.c
+++ b/dir.c
@@ -64,13 +64,6 @@ int strncmp_icase(const char *a, const char *b, size_t count)
return ignore_case ? strncasecmp(a, b, count) : strncmp(a, b, count);
}
-int fnmatch_icase(const char *pattern, const char *string, int flags)
-{
- return wildmatch(pattern, string,
- flags | (ignore_case ? WM_CASEFOLD : 0),
- NULL);
-}
-
int git_fnmatch(const struct pathspec_item *item,
const char *pattern, const char *string,
int prefix)
diff --git a/dir.h b/dir.h
index 301b737a37..d56d2fb48f 100644
--- a/dir.h
+++ b/dir.h
@@ -272,7 +272,6 @@ 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);
/*
* The prefix part of pattern must not contains wildcards.
diff --git a/wrapper.c b/wrapper.c
index 9afc1a021c..9009f8bd3d 100644
--- a/wrapper.c
+++ b/wrapper.c
@@ -446,23 +446,6 @@ int git_mkstemp(char *path, size_t len, const char *template)
return mkstemp(path);
}
-/* git_mkstemps() - create tmp file with suffix honoring TMPDIR variable. */
-int git_mkstemps(char *path, size_t len, const char *template, int suffix_len)
-{
- const char *tmp;
- size_t n;
-
- tmp = getenv("TMPDIR");
- if (!tmp)
- tmp = "/tmp";
- n = snprintf(path, len, "%s/%s", tmp, template);
- if (len <= n) {
- errno = ENAMETOOLONG;
- return -1;
- }
- return mkstemps(path, suffix_len);
-}
-
/* Adapted from libiberty's mkstemp.c. */
#undef TMP_MAX