summaryrefslogtreecommitdiff
path: root/dir.h
diff options
context:
space:
mode:
authorAdam Spiers <git@adamspiers.org>2013-01-06 16:58:05 +0000
committerJunio C Hamano <gitster@pobox.com>2013-01-06 14:26:37 -0800
commit270be8160493eb25ee43eb7db8dda2504343dc65 (patch)
tree93d5642a17e8d182a1c9a22c02c62e3219416ae0 /dir.h
parentc04318e46aae79b8b8df059e2118519d83dfee12 (diff)
downloadgit-270be8160493eb25ee43eb7db8dda2504343dc65.tar.gz
dir.c: provide clear_directory() for reclaiming dir_struct memory
By the end of a directory traversal, a dir_struct instance will typically contains pointers to various data structures on the heap. clear_directory() provides a convenient way to reclaim that memory. Signed-off-by: Adam Spiers <git@adamspiers.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'dir.h')
-rw-r--r--dir.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/dir.h b/dir.h
index 64c410e132..dd42a3a061 100644
--- a/dir.h
+++ b/dir.h
@@ -169,6 +169,7 @@ extern void parse_exclude_pattern(const char **string, int *patternlen, int *fla
extern void add_exclude(const char *string, const char *base,
int baselen, struct exclude_list *el, int srcpos);
extern void clear_exclude_list(struct exclude_list *el);
+extern void clear_directory(struct dir_struct *dir);
extern int file_exists(const char *);
extern int is_inside_dir(const char *dir);