* [PATCH 1/2] dir.c: remove dead function fnmatch_icase()
@ 2016-04-22 12:25 Nguyễn Thái Ngọc Duy
2016-04-22 12:25 ` [PATCH 2/2] wrapper.c: delete dead function git_mkstemps() Nguyễn Thái Ngọc Duy
0 siblings, 1 reply; 2+ messages in thread
From: Nguyễn Thái Ngọc Duy @ 2016-04-22 12:25 UTC (permalink / raw)
To: git; +Cc: Nguyễn Thái Ngọc Duy
It was largely replaced by fnmatch_icase_mem() and its last use was in
84b8b5d (remove match_pathspec() in favor of match_pathspec_depth() -
2013-07-14).
Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
---
dir.c | 7 -------
dir.h | 1 -
2 files changed, 8 deletions(-)
diff --git a/dir.c b/dir.c
index 996653b..656f272 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 301b737..d56d2fb 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.
--
2.8.0.rc0.210.gd302cd2
^ permalink raw reply related [flat|nested] 2+ messages in thread* [PATCH 2/2] wrapper.c: delete dead function git_mkstemps()
2016-04-22 12:25 [PATCH 1/2] dir.c: remove dead function fnmatch_icase() Nguyễn Thái Ngọc Duy
@ 2016-04-22 12:25 ` Nguyễn Thái Ngọc Duy
0 siblings, 0 replies; 2+ messages in thread
From: Nguyễn Thái Ngọc Duy @ 2016-04-22 12:25 UTC (permalink / raw)
To: git; +Cc: Nguyễn Thái Ngọc Duy
Its last call site was replaced by mks_tempfile_ts() in 284098f (diff:
use tempfile module - 2015-08-12) and there's a good chance
mks_tempfile_ts will continue to successfully handle this job. Delete
it.
Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
---
cache.h | 2 --
wrapper.c | 17 -----------------
2 files changed, 19 deletions(-)
diff --git a/cache.h b/cache.h
index 2711048..fd728f0 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/wrapper.c b/wrapper.c
index 9afc1a0..9009f8b 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
--
2.8.0.rc0.210.gd302cd2
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2016-04-22 12:25 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-04-22 12:25 [PATCH 1/2] dir.c: remove dead function fnmatch_icase() Nguyễn Thái Ngọc Duy
2016-04-22 12:25 ` [PATCH 2/2] wrapper.c: delete dead function git_mkstemps() Nguyễn Thái Ngọc Duy
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.