Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2016-06-03 00:09:22 +0300
committerJunio C Hamano <gitster@pobox.com>2016-06-03 00:09:22 +0300
commited6e8038f98e7f15e571a9a291ee4acf438b4dc5 (patch)
tree82560db1d8fef5db3c449213f992bd26a5473ac5 /pathspec.h
parent60bd4b1c513bb652cdffad44382046ca872140eb (diff)
pathspec: rename free_pathspec() to clear_pathspec()
The function takes a pointer to a pathspec structure, and releases the resources held by it, but does not free() the structure itself. Such a function should be called "clear", not "free". Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'pathspec.h')
-rw-r--r--pathspec.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/pathspec.h b/pathspec.h
index 0c1126264a..4a80f6fc96 100644
--- a/pathspec.h
+++ b/pathspec.h
@@ -19,7 +19,7 @@
#define PATHSPEC_ONESTAR 1 /* the pathspec pattern satisfies GFNM_ONESTAR */
struct pathspec {
- const char **_raw; /* get_pathspec() result, not freed by free_pathspec() */
+ const char **_raw; /* get_pathspec() result, not freed by clear_pathspec() */
int nr;
unsigned int has_wildcard:1;
unsigned int recursive:1;
@@ -74,7 +74,7 @@ extern void parse_pathspec(struct pathspec *pathspec,
const char *prefix,
const char **args);
extern void copy_pathspec(struct pathspec *dst, const struct pathspec *src);
-extern void free_pathspec(struct pathspec *);
+extern void clear_pathspec(struct pathspec *);
static inline int ps_strncmp(const struct pathspec_item *item,
const char *s1, const char *s2, size_t n)