parse_hide_refs_config: tell parse_config_key we don't want a subsection

This lets us avoid declaring some otherwise useless
variables.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
Jeff King 2017-02-24 16:08:16 -05:00 committed by Junio C Hamano
parent 48f8d9f732
commit ad8c7cdadd

7
refs.c
View File

@ -1029,11 +1029,10 @@ 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;
const char *key;
if (!strcmp("transfer.hiderefs", var) ||
(!parse_config_key(var, section, &subsection, &subsection_len, &key)
&& !subsection && !strcmp(key, "hiderefs"))) {
(!parse_config_key(var, section, NULL, NULL, &key) &&
!strcmp(key, "hiderefs"))) {
char *ref;
int len;