tree-walk: use enum interesting instead of integer

Commit d688cf0 (tree_entry_interesting(): give meaningful names to return values - 2011-10-24) converts most of the tree_entry_interesting values to the new enum, except "never_interesting". This completes the conversion. Signed-off-by: Junio C Hamano <gitster@pobox.com>

Nguyễn Thái Ngọc Duy committed Oct 20, 2012 at 00:14 UTC c3a47ca9a78a59e88bb95ffe72fdafb289c0511b
1 file changed +4 -4
tree-walk.c
+4 -4
@@ -490,11 +490,11 @@ int get_tree_entry(const unsigned char *tree_sha1, const char *name, unsigned ch
490
491 static int match_entry(const struct name_entry *entry, int pathlen,
492 const char *match, int matchlen,
493 - int *never_interesting)
493 + enum interesting *never_interesting)
494 {
495 int m = -1; /* signals that we haven't called strncmp() */
496
497 - if (*never_interesting) {
497 + if (*never_interesting != entry_not_interesting) {
498 /*
499 * We have not seen any match that sorts later
500 * than the current path.
@@ -522,7 +522,7 @@ static int match_entry(const struct name_entry *entry, int pathlen,
522 * the variable to -1 and that is what will be
523 * returned, allowing the caller to terminate early.
524 */
525 - *never_interesting = 0;
525 + *never_interesting = entry_not_interesting;
526 }
527
528 if (pathlen > matchlen)
@@ -584,7 +584,7 @@ enum interesting tree_entry_interesting(const struct name_entry *entry,
584 {
585 int i;
586 int pathlen, baselen = base->len - base_offset;
587 - int never_interesting = ps->has_wildcard ?
587 + enum interesting never_interesting = ps->has_wildcard ?
588 entry_not_interesting : all_entries_not_interesting;
589
590 if (!ps->nr) {