diff options
author | Junio C Hamano <gitster@pobox.com> | 2014-01-27 10:44:06 -0800 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2014-01-27 10:44:07 -0800 |
commit | 9bb528709878d26ac75bf0cb075cc694acd0d69d (patch) | |
tree | 4273e5df7a1c2f99269256eb3641167acd5a4cf9 /refs.c | |
parent | ac355298b1bf8ba46aeb4aa7247b470d77ab5631 (diff) | |
parent | 54457fe509ee311abc2c4c2a796d16ea379aa8f2 (diff) | |
download | git-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.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -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; } |