diff options
author | Nguyễn Thái Ngọc Duy <pclouds@gmail.com> | 2010-11-27 01:17:44 +0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2010-11-29 13:34:55 -0800 |
commit | 0fd0e2417d383168b6a510f78c754298435a89ce (patch) | |
tree | dee86e1208ab33e967d9108232f7fb7b89d34800 /dir.c | |
parent | 2977ffbbe134e0fe9bc8aa3643e2d40111643c23 (diff) | |
download | git-0fd0e2417d383168b6a510f78c754298435a89ce.tar.gz git-0fd0e2417d383168b6a510f78c754298435a89ce.tar.xz |
dir.c: add free_excludes()
Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'dir.c')
-rw-r--r-- | dir.c | 12 |
1 files changed, 12 insertions, 0 deletions
@@ -223,6 +223,18 @@ static void *read_skip_worktree_file_from_index(const char *path, size_t *size) return data; } +void free_excludes(struct exclude_list *el) +{ + int i; + + for (i = 0; i < el->nr; i++) + free(el->excludes[i]); + free(el->excludes); + + el->nr = 0; + el->excludes = NULL; +} + int add_excludes_from_file_to_list(const char *fname, const char *base, int baselen, |