1
0
Fork 0
mirror of https://github.com/git/git.git synced 2024-06-10 13:26:12 +02:00

Merge branch 'sb/parse-hide-refs-config-cleanup'

Code clean-up.

* sb/parse-hide-refs-config-cleanup:
  refs: parse_hide_refs_config to use parse_config_key
This commit is contained in:
Junio C Hamano 2017-03-10 13:24:21 -08:00
commit 3406129900

7
refs.c
View File

@ -1035,10 +1035,11 @@ static struct string_list *hide_refs;
int parse_hide_refs_config(const char *var, const char *value, const char *section)
{
const char *subsection, *key;
int subsection_len;
if (!strcmp("transfer.hiderefs", var) ||
/* NEEDSWORK: use parse_config_key() once both are merged */
(starts_with(var, section) && var[strlen(section)] == '.' &&
!strcmp(var + strlen(section), ".hiderefs"))) {
(!parse_config_key(var, section, &subsection, &subsection_len, &key)
&& !subsection && !strcmp(key, "hiderefs"))) {
char *ref;
int len;