Re: [PATCH v3 02/16] dir: remove struct path_simplify
From: Duy Nguyen <hidden>
Date: 2017-01-03 12:03:18
On Wed, Dec 14, 2016 at 6:14 AM, Brandon Williams [off-list ref] wrote:
quoted hunk ↗ jump to hunk
@@ -2010,14 +1987,11 @@ static struct untracked_cache_dir *validate_untracked_cache(struct dir_struct *d return root; } -int read_directory(struct dir_struct *dir, const char *path, int len, const struct pathspec *pathspec) +int read_directory(struct dir_struct *dir, const char *path, + int len, const struct pathspec *pathspec) { - struct path_simplify *simplify; struct untracked_cache_dir *untracked; - /* - * Check out create_simplify() - */ if (pathspec) GUARD_PATHSPEC(pathspec, PATHSPEC_FROMTOP |
This GUARD_PATHSPEC macro should be moved into simplify_away() and exclude_pathspec_matches(), so that next time somebody adds a new pathspec magic, they can basically grep GUARD_PATHSPEC and determine if these code can support their favorite magic or not. -- Duy