aboutsummaryrefslogtreecommitdiff
path: root/dir.c
diff options
context:
space:
mode:
Diffstat (limited to 'dir.c')
-rw-r--r--dir.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/dir.c b/dir.c
index b35b6330f..442a548f2 100644
--- a/dir.c
+++ b/dir.c
@@ -218,7 +218,7 @@ static int match_pathspec_item(const struct pathspec_item *item, int prefix,
* The normal call pattern is:
* 1. prefix = common_prefix_len(ps);
* 2. prune something, or fill_directory
- * 3. match_pathspec_depth()
+ * 3. match_pathspec()
*
* 'prefix' at #1 may be shorter than the command's prefix and
* it's ok for #2 to match extra files. Those extras will be
@@ -282,10 +282,10 @@ static int match_pathspec_item(const struct pathspec_item *item, int prefix,
* pathspec did not match any names, which could indicate that the
* user mistyped the nth pathspec.
*/
-static int match_pathspec_depth_1(const struct pathspec *ps,
- const char *name, int namelen,
- int prefix, char *seen,
- int exclude)
+static int do_match_pathspec(const struct pathspec *ps,
+ const char *name, int namelen,
+ int prefix, char *seen,
+ int exclude)
{
int i, retval = 0;
@@ -350,15 +350,15 @@ static int match_pathspec_depth_1(const struct pathspec *ps,
return retval;
}
-int match_pathspec_depth(const struct pathspec *ps,
- const char *name, int namelen,
- int prefix, char *seen)
+int match_pathspec(const struct pathspec *ps,
+ const char *name, int namelen,
+ int prefix, char *seen)
{
int positive, negative;
- positive = match_pathspec_depth_1(ps, name, namelen, prefix, seen, 0);
+ positive = do_match_pathspec(ps, name, namelen, prefix, seen, 0);
if (!(ps->magic & PATHSPEC_EXCLUDE) || !positive)
return positive;
- negative = match_pathspec_depth_1(ps, name, namelen, prefix, seen, 1);
+ negative = do_match_pathspec(ps, name, namelen, prefix, seen, 1);
return negative ? 0 : positive;
}