Re: [PATCH v3 02/16] dir: remove struct path_simplify
- From
Duy Nguyen <pclouds@gmail.com>
- Date
- Jan 3, 2017, 12:02 UTC
- Message-ID
- <CACsJy8AaRqJ4jaZ19__kFR+pXtjJ4o_Jik8NL_Mk5yaA4aGRBQ@mail.gmail.com>
- In-Reply-To
- <1481670870-66754-3-git-send-email-bmwill@google.com>
On Wed, Dec 14, 2016 at 6:14 AM, Brandon Williams <bmwill@google.com> wrote:
Show 17 quoted lines
> @@ -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