summaryrefslogtreecommitdiff
path: root/tree-walk.c
diff options
context:
space:
mode:
authorJeff King <peff@peff.net>2012-11-09 12:51:02 -0500
committerJeff King <peff@peff.net>2012-11-09 12:51:03 -0500
commit9d91c0e3d5d1bf9339a31ecbd5f6defdac8540d0 (patch)
treed08bbb525de44a8c29928348a16a4e51f7b50a22 /tree-walk.c
parent23a50a1fb113b702012935ee8c6e945cf58edbd7 (diff)
parentc3a47ca9a78a59e88bb95ffe72fdafb289c0511b (diff)
downloadgit-9d91c0e3d5d1bf9339a31ecbd5f6defdac8540d0.tar.gz
Merge branch 'nd/tree-walk-enum-cleanup'
* nd/tree-walk-enum-cleanup: tree-walk: use enum interesting instead of integer
Diffstat (limited to 'tree-walk.c')
-rw-r--r--tree-walk.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/tree-walk.c b/tree-walk.c
index 492c7cd744..3f54c02d76 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) {