X-Git-Url: http://git.tremily.us/?a=blobdiff_plain;f=tree-walk.c;h=3f54c02d7624c26632e3a0f81b8bb970c6ac307f;hb=9798f7e5f948b2586c33d850f6a00d4fc0537d75;hp=492c7cd744d5f0739c8393ab67705c0be1254783;hpb=200282f1c7eca23ad34b1c5f81bf4b9de334a7d1;p=git.git diff --git a/tree-walk.c b/tree-walk.c index 492c7cd74..3f54c02d7 100644 --- a/tree-walk.c +++ b/tree-walk.c @@ -490,11 +490,11 @@ int get_tree_entry(const unsigned char *tree_sha1, const char *name, unsigned ch static int match_entry(const struct name_entry *entry, int pathlen, const char *match, int matchlen, - int *never_interesting) + enum interesting *never_interesting) { int m = -1; /* signals that we haven't called strncmp() */ - if (*never_interesting) { + if (*never_interesting != entry_not_interesting) { /* * We have not seen any match that sorts later * than the current path. @@ -522,7 +522,7 @@ static int match_entry(const struct name_entry *entry, int pathlen, * the variable to -1 and that is what will be * returned, allowing the caller to terminate early. */ - *never_interesting = 0; + *never_interesting = entry_not_interesting; } if (pathlen > matchlen) @@ -584,7 +584,7 @@ enum interesting tree_entry_interesting(const struct name_entry *entry, { int i; int pathlen, baselen = base->len - base_offset; - int never_interesting = ps->has_wildcard ? + enum interesting never_interesting = ps->has_wildcard ? entry_not_interesting : all_entries_not_interesting; if (!ps->nr) {