Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/dir.c
diff options
context:
space:
mode:
authorJeff King <peff@peff.net>2022-08-19 11:50:54 +0300
committerJunio C Hamano <gitster@pobox.com>2022-08-19 22:20:56 +0300
commit77651c032c39897ebeba88649d966a9f732facd3 (patch)
treeea5e5e36e5d24b586055b464e3ce3994b0a25f25 /dir.c
parente2841f706ecf449c67514c253d80445b9db9a08b (diff)
match_pathname(): drop unused "flags" parameter
This field has not been used since the function was introduced in b559263216 (exclude: split pathname matching code into a separate function, 2012-10-15), though there was a brief period where it was erroneously used and then reverted in ed4958477b (dir: fix pattern matching on dirs, 2021-09-24) and 5ceb663e92 (dir: fix directory-matching bug, 2021-11-02). It's possible we'd eventually add a flag that makes it useful here, but there are only a handful of callers. It would be easy to add back if necessary, and in the meantime this makes the function interface less misleading. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'dir.c')
-rw-r--r--dir.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/dir.c b/dir.c
index d7cfb08e44..50eeb8b11e 100644
--- a/dir.c
+++ b/dir.c
@@ -1244,8 +1244,7 @@ int match_basename(const char *basename, int basenamelen,
int match_pathname(const char *pathname, int pathlen,
const char *base, int baselen,
- const char *pattern, int prefix, int patternlen,
- unsigned flags)
+ const char *pattern, int prefix, int patternlen)
{
const char *name;
int namelen;
@@ -1347,8 +1346,7 @@ static struct path_pattern *last_matching_pattern_from_list(const char *pathname
if (match_pathname(pathname, pathlen,
pattern->base,
pattern->baselen ? pattern->baselen - 1 : 0,
- exclude, prefix, pattern->patternlen,
- pattern->flags)) {
+ exclude, prefix, pattern->patternlen)) {
res = pattern;
break;
}