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
diff options
context:
space:
mode:
-rw-r--r--apply.c2
-rw-r--r--builtin/describe.c4
-rw-r--r--builtin/ls-remote.c2
-rw-r--r--builtin/name-rev.c2
-rw-r--r--builtin/reflog.c2
-rw-r--r--builtin/replace.c2
-rw-r--r--builtin/show-branch.c2
-rw-r--r--config.c2
-rw-r--r--diffcore-order.c2
-rw-r--r--dir.c8
-rw-r--r--ref-filter.c4
-rw-r--r--refs.c2
-rw-r--r--revision.c2
-rw-r--r--t/helper/test-wildmatch.c6
-rw-r--r--wildmatch.c3
-rw-r--r--wildmatch.h6
16 files changed, 22 insertions, 29 deletions
diff --git a/apply.c b/apply.c
index 679ed7732d..bb411b5810 100644
--- a/apply.c
+++ b/apply.c
@@ -2077,7 +2077,7 @@ static int use_patch(struct apply_state *state, struct patch *p)
/* See if it matches any of exclude/include rule */
for (i = 0; i < state->limit_by_name.nr; i++) {
struct string_list_item *it = &state->limit_by_name.items[i];
- if (!wildmatch(it->string, pathname, 0, NULL))
+ if (!wildmatch(it->string, pathname, 0))
return (it->util != NULL);
}
diff --git a/builtin/describe.c b/builtin/describe.c
index 893c8789f4..2fe05f5324 100644
--- a/builtin/describe.c
+++ b/builtin/describe.c
@@ -142,7 +142,7 @@ static int get_name(const char *path, const struct object_id *oid, int flag, voi
return 0;
for_each_string_list_item(item, &exclude_patterns) {
- if (!wildmatch(item->string, path + 10, 0, NULL))
+ if (!wildmatch(item->string, path + 10, 0))
return 0;
}
}
@@ -158,7 +158,7 @@ static int get_name(const char *path, const struct object_id *oid, int flag, voi
return 0;
for_each_string_list_item(item, &patterns) {
- if (!wildmatch(item->string, path + 10, 0, NULL))
+ if (!wildmatch(item->string, path + 10, 0))
break;
/* If we get here, no pattern matched. */
diff --git a/builtin/ls-remote.c b/builtin/ls-remote.c
index b2d7d5ce68..c4be98ab9e 100644
--- a/builtin/ls-remote.c
+++ b/builtin/ls-remote.c
@@ -24,7 +24,7 @@ static int tail_match(const char **pattern, const char *path)
pathbuf = xstrfmt("/%s", path);
while ((p = *(pattern++)) != NULL) {
- if (!wildmatch(p, pathbuf, 0, NULL)) {
+ if (!wildmatch(p, pathbuf, 0)) {
free(pathbuf);
return 1;
}
diff --git a/builtin/name-rev.c b/builtin/name-rev.c
index 7fc7e66e85..d21a5002a7 100644
--- a/builtin/name-rev.c
+++ b/builtin/name-rev.c
@@ -129,7 +129,7 @@ static int subpath_matches(const char *path, const char *filter)
const char *subpath = path;
while (subpath) {
- if (!wildmatch(filter, subpath, 0, NULL))
+ if (!wildmatch(filter, subpath, 0))
return subpath - path;
subpath = strchr(subpath, '/');
if (subpath)
diff --git a/builtin/reflog.c b/builtin/reflog.c
index 920c16dac0..96c82b4f5e 100644
--- a/builtin/reflog.c
+++ b/builtin/reflog.c
@@ -485,7 +485,7 @@ static void set_reflog_expiry_param(struct cmd_reflog_expire_cb *cb, int slot, c
return; /* both given explicitly -- nothing to tweak */
for (ent = reflog_expire_cfg; ent; ent = ent->next) {
- if (!wildmatch(ent->pattern, ref, 0, NULL)) {
+ if (!wildmatch(ent->pattern, ref, 0)) {
if (!(slot & EXPIRE_TOTAL))
cb->expire_total = ent->expire_total;
if (!(slot & EXPIRE_UNREACH))
diff --git a/builtin/replace.c b/builtin/replace.c
index c921bc976f..89262df5a1 100644
--- a/builtin/replace.c
+++ b/builtin/replace.c
@@ -40,7 +40,7 @@ static int show_reference(const char *refname, const struct object_id *oid,
{
struct show_data *data = cb_data;
- if (!wildmatch(data->pattern, refname, 0, NULL)) {
+ if (!wildmatch(data->pattern, refname, 0)) {
if (data->format == REPLACE_FORMAT_SHORT)
printf("%s\n", refname);
else if (data->format == REPLACE_FORMAT_MEDIUM)
diff --git a/builtin/show-branch.c b/builtin/show-branch.c
index 3636a05594..82f378e7f5 100644
--- a/builtin/show-branch.c
+++ b/builtin/show-branch.c
@@ -437,7 +437,7 @@ static int append_matching_ref(const char *refname, const struct object_id *oid,
slash--;
if (!*tail)
return 0;
- if (wildmatch(match_ref_pattern, tail, 0, NULL))
+ if (wildmatch(match_ref_pattern, tail, 0))
return 0;
if (starts_with(refname, "refs/heads/"))
return append_head_ref(refname, oid, flag, cb_data);
diff --git a/config.c b/config.c
index 34a139c40b..260caf27b8 100644
--- a/config.c
+++ b/config.c
@@ -245,7 +245,7 @@ again:
}
ret = !wildmatch(pattern.buf + prefix, text.buf + prefix,
- icase ? WM_CASEFOLD : 0, NULL);
+ icase ? WM_CASEFOLD : 0);
if (!ret && !already_tried_absolute) {
/*
diff --git a/diffcore-order.c b/diffcore-order.c
index 1957f822a5..19e73311f9 100644
--- a/diffcore-order.c
+++ b/diffcore-order.c
@@ -67,7 +67,7 @@ static int match_order(const char *path)
strbuf_addstr(&p, path);
while (p.buf[0]) {
char *cp;
- if (!wildmatch(order[i], p.buf, 0, NULL))
+ if (!wildmatch(order[i], p.buf, 0))
return i;
cp = strrchr(p.buf, '/');
if (!cp)
diff --git a/dir.c b/dir.c
index 5f1afb56bc..c64965f237 100644
--- a/dir.c
+++ b/dir.c
@@ -91,13 +91,11 @@ int git_fnmatch(const struct pathspec_item *item,
if (item->magic & PATHSPEC_GLOB)
return wildmatch(pattern, string,
WM_PATHNAME |
- (item->magic & PATHSPEC_ICASE ? WM_CASEFOLD : 0),
- NULL);
+ (item->magic & PATHSPEC_ICASE ? WM_CASEFOLD : 0));
else
/* wildmatch has not learned no FNM_PATHNAME mode yet */
return wildmatch(pattern, string,
- item->magic & PATHSPEC_ICASE ? WM_CASEFOLD : 0,
- NULL);
+ item->magic & PATHSPEC_ICASE ? WM_CASEFOLD : 0);
}
static int fnmatch_icase_mem(const char *pattern, int patternlen,
@@ -121,7 +119,7 @@ static int fnmatch_icase_mem(const char *pattern, int patternlen,
if (ignore_case)
flags |= WM_CASEFOLD;
- match_status = wildmatch(use_pat, use_str, flags, NULL);
+ match_status = wildmatch(use_pat, use_str, flags);
strbuf_release(&pat_buf);
strbuf_release(&str_buf);
diff --git a/ref-filter.c b/ref-filter.c
index ab32bc9c31..718def443a 100644
--- a/ref-filter.c
+++ b/ref-filter.c
@@ -1624,7 +1624,7 @@ static int match_pattern(const struct ref_filter *filter, const char *refname)
skip_prefix(refname, "refs/", &refname));
for (; *patterns; patterns++) {
- if (!wildmatch(*patterns, refname, flags, NULL))
+ if (!wildmatch(*patterns, refname, flags))
return 1;
}
return 0;
@@ -1655,7 +1655,7 @@ static int match_name_as_path(const struct ref_filter *filter, const char *refna
refname[plen] == '/' ||
p[plen-1] == '/'))
return 1;
- if (!wildmatch(p, refname, WM_PATHNAME, NULL))
+ if (!wildmatch(p, refname, WM_PATHNAME))
return 1;
}
return 0;
diff --git a/refs.c b/refs.c
index f0685c9251..32626a4cd1 100644
--- a/refs.c
+++ b/refs.c
@@ -229,7 +229,7 @@ static int filter_refs(const char *refname, const struct object_id *oid,
{
struct ref_filter *filter = (struct ref_filter *)data;
- if (wildmatch(filter->pattern, refname, 0, NULL))
+ if (wildmatch(filter->pattern, refname, 0))
return 0;
return filter->fn(refname, oid, flags, filter->cb_data);
}
diff --git a/revision.c b/revision.c
index d81c08a1de..4ab8344ee8 100644
--- a/revision.c
+++ b/revision.c
@@ -1142,7 +1142,7 @@ int ref_excluded(struct string_list *ref_excludes, const char *path)
if (!ref_excludes)
return 0;
for_each_string_list_item(item, ref_excludes) {
- if (!wildmatch(item->string, path, 0, NULL))
+ if (!wildmatch(item->string, path, 0))
return 1;
}
return 0;
diff --git a/t/helper/test-wildmatch.c b/t/helper/test-wildmatch.c
index 52be876fed..921d7b3e7e 100644
--- a/t/helper/test-wildmatch.c
+++ b/t/helper/test-wildmatch.c
@@ -11,11 +11,11 @@ int cmd_main(int argc, const char **argv)
argv[i] += 3;
}
if (!strcmp(argv[1], "wildmatch"))
- return !!wildmatch(argv[3], argv[2], WM_PATHNAME, NULL);
+ return !!wildmatch(argv[3], argv[2], WM_PATHNAME);
else if (!strcmp(argv[1], "iwildmatch"))
- return !!wildmatch(argv[3], argv[2], WM_PATHNAME | WM_CASEFOLD, NULL);
+ return !!wildmatch(argv[3], argv[2], WM_PATHNAME | WM_CASEFOLD);
else if (!strcmp(argv[1], "pathmatch"))
- return !!wildmatch(argv[3], argv[2], 0, NULL);
+ return !!wildmatch(argv[3], argv[2], 0);
else
return 1;
}
diff --git a/wildmatch.c b/wildmatch.c
index 57c8765805..d074c1be10 100644
--- a/wildmatch.c
+++ b/wildmatch.c
@@ -272,8 +272,7 @@ static int dowild(const uchar *p, const uchar *text, unsigned int flags)
}
/* Match the "pattern" against the "text" string. */
-int wildmatch(const char *pattern, const char *text,
- unsigned int flags, struct wildopts *wo)
+int wildmatch(const char *pattern, const char *text, unsigned int flags)
{
return dowild((const uchar*)pattern, (const uchar*)text, flags);
}
diff --git a/wildmatch.h b/wildmatch.h
index 4090c8f4bb..b8c826aa68 100644
--- a/wildmatch.h
+++ b/wildmatch.h
@@ -10,9 +10,5 @@
#define WM_ABORT_ALL -1
#define WM_ABORT_TO_STARSTAR -2
-struct wildopts;
-
-int wildmatch(const char *pattern, const char *text,
- unsigned int flags,
- struct wildopts *wo);
+int wildmatch(const char *pattern, const char *text, unsigned int flags);
#endif