Re: [PATCH 3/3] Convert all fnmatch() calls to wildmatch()
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Dec 19, 2012, 18:36 UTC
- Message-ID
- <7v8v8tanyn.fsf@alter.siamese.dyndns.org>
- In-Reply-To
- <1355922488-20976-4-git-send-email-pclouds@gmail.com>
Nguyễn Thái Ngọc Duy <pclouds@gmail.com> writes:
Show 19 quoted lines
> diff --git a/tree-walk.c b/tree-walk.c
> index 492c7cd..c729e89 100644
> --- a/tree-walk.c
> +++ b/tree-walk.c
> @@ -3,6 +3,7 @@
> #include "unpack-trees.h"
> #include "dir.h"
> #include "tree.h"
> +#include "wildmatch.h"
>
> static const char *get_mode(const char *str, unsigned int *modep)
> {
> @@ -627,7 +628,7 @@ enum interesting tree_entry_interesting(const struct name_entry *entry,
> return entry_interesting;
>
> if (item->use_wildcard) {
> - if (!fnmatch(match + baselen, entry->path, 0))
> + if (!wildmatch(match + baselen, entry->path, 0))
> return entry_interesting;This and the change to dir.c obviously have interactions with 8c6abbc (pathspec: apply "*.c" optimization from exclude, 2012-11-24).
I've already alluded to it in my response to 2/3, I guess.