diff options
author | Ævar Arnfjörð Bjarmason <avarab@gmail.com> | 2017-06-22 21:38:08 +0000 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2017-06-23 18:27:07 -0700 |
commit | 55d3426929d4d8c3dec402cabe6fb1bf27d6abad (patch) | |
tree | 1b037524961e2fc22f891e0e2c2a5dde72f8c0df /builtin | |
parent | 5402b1352f5181247405fbff1887008a0cb3b04a (diff) | |
download | git-55d3426929d4d8c3dec402cabe6fb1bf27d6abad.tar.gz |
wildmatch: remove unused wildopts parameterab/wildmatch
Remove the unused wildopts placeholder struct from being passed to all
wildmatch() invocations, or rather remove all the boilerplate NULL
parameters.
This parameter was added back in commit 9b3497cab9 ("wildmatch: rename
constants and update prototype", 2013-01-01) as a placeholder for
future use. Over 4 years later nothing has made use of it, let's just
remove it. It can be added in the future if we find some reason to
start using such a parameter.
Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin')
-rw-r--r-- | builtin/describe.c | 4 | ||||
-rw-r--r-- | builtin/ls-remote.c | 2 | ||||
-rw-r--r-- | builtin/name-rev.c | 2 | ||||
-rw-r--r-- | builtin/reflog.c | 2 | ||||
-rw-r--r-- | builtin/replace.c | 2 | ||||
-rw-r--r-- | builtin/show-branch.c | 2 |
6 files changed, 7 insertions, 7 deletions
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); |