aboutsummaryrefslogtreecommitdiff
path: root/refs.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2014-01-27 10:44:06 -0800
committerJunio C Hamano <gitster@pobox.com>2014-01-27 10:44:07 -0800
commit9bb528709878d26ac75bf0cb075cc694acd0d69d (patch)
tree4273e5df7a1c2f99269256eb3641167acd5a4cf9 /refs.c
parentac355298b1bf8ba46aeb4aa7247b470d77ab5631 (diff)
parent54457fe509ee311abc2c4c2a796d16ea379aa8f2 (diff)
downloadgit-9bb528709878d26ac75bf0cb075cc694acd0d69d.tar.gz
git-9bb528709878d26ac75bf0cb075cc694acd0d69d.tar.xz
Merge branch 'mh/retire-ref-fetch-rules'
Code simplification. * mh/retire-ref-fetch-rules: refname_match(): always use the rules in ref_rev_parse_rules
Diffstat (limited to 'refs.c')
-rw-r--r--refs.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/refs.c b/refs.c
index 490b57b88..fc33ee8ff 100644
--- a/refs.c
+++ b/refs.c
@@ -1880,7 +1880,7 @@ const char *prettify_refname(const char *name)
0);
}
-const char *ref_rev_parse_rules[] = {
+static const char *ref_rev_parse_rules[] = {
"%.*s",
"refs/%.*s",
"refs/tags/%.*s",
@@ -1890,12 +1890,12 @@ const char *ref_rev_parse_rules[] = {
NULL
};
-int refname_match(const char *abbrev_name, const char *full_name, const char **rules)
+int refname_match(const char *abbrev_name, const char *full_name)
{
const char **p;
const int abbrev_name_len = strlen(abbrev_name);
- for (p = rules; *p; p++) {
+ for (p = ref_rev_parse_rules; *p; p++) {
if (!strcmp(full_name, mkpath(*p, abbrev_name_len, abbrev_name))) {
return 1;
}