diff options
author | Junio C Hamano <gitster@pobox.com> | 2010-12-22 14:40:26 -0800 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2010-12-22 14:40:26 -0800 |
commit | e39212ab08e8d37dda5d8fd32b54099fe01dbbdb (patch) | |
tree | acfce393969ebf4d2404a4619c84553e761803e7 /dir.c | |
parent | 716958c9a23cbb4bf671dc89e094742e8ec41793 (diff) | |
parent | 9e082734b3a7c2685c1593dae8dca1e73568d51c (diff) | |
download | git-e39212ab08e8d37dda5d8fd32b54099fe01dbbdb.tar.gz |
Merge branch 'nd/maint-fix-add-typo-detection'
* nd/maint-fix-add-typo-detection:
Revert "excluded_1(): support exclude files in index"
unpack-trees: fix sparse checkout's "unable to match directories"
unpack-trees: move all skip-worktree checks back to unpack_trees()
dir.c: add free_excludes()
cache.h: realign and use (1 << x) form for CE_* constants
Diffstat (limited to 'dir.c')
-rw-r--r-- | dir.c | 19 |
1 files changed, 12 insertions, 7 deletions
@@ -253,6 +253,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, @@ -389,13 +401,6 @@ int excluded_from_list(const char *pathname, int to_exclude = x->to_exclude; if (x->flags & EXC_FLAG_MUSTBEDIR) { - if (!dtype) { - if (!prefixcmp(pathname, exclude) && - pathname[x->patternlen] == '/') - return to_exclude; - else - continue; - } if (*dtype == DT_UNKNOWN) *dtype = get_dtype(NULL, pathname, pathlen); if (*dtype != DT_DIR) |