Commit f6198812 authored by Adam Spiers's avatar Adam Spiers Committed by Junio C Hamano

dir.c: rename free_excludes() to clear_exclude_list()

It is clearer to use a 'clear_' prefix for functions which empty
and deallocate the contents of a data structure without freeing
the structure itself, and a 'free_' prefix for functions which
also free the structure itself. default avatarAdam Spiers <[email protected]>
Signed-off-by: default avatarJunio C Hamano <[email protected]>
parent a35341a8
......@@ -400,7 +400,11 @@ static void *read_skip_worktree_file_from_index(const char *path, size_t *size)
return data;
void free_excludes(struct exclude_list *el)
* Frees memory within el which was allocated for exclude patterns and
* the file buffer. Does not free el itself.
void clear_exclude_list(struct exclude_list *el)
int i;
......@@ -135,7 +135,7 @@ extern void add_excludes_from_file(struct dir_struct *, const char *fname);
extern void parse_exclude_pattern(const char **string, int *patternlen, int *flags, int *nowildcardlen);
extern void add_exclude(const char *string, const char *base,
int baselen, struct exclude_list *el);
extern void free_excludes(struct exclude_list *el);
extern void clear_exclude_list(struct exclude_list *el);
extern int file_exists(const char *);
extern int is_inside_dir(const char *dir);
......@@ -1153,7 +1153,7 @@ int unpack_trees(unsigned len, struct tree_desc *t, struct unpack_trees_options
*o->dst_index = o->result;
if (o->path_exclude_check) {
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment