Skip to content

Commit ad8c7cd

Browse files
peffgitster
authored andcommitted
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>
1 parent 48f8d9f commit ad8c7cd

1 file changed

Lines changed: 3 additions & 4 deletions

File tree

refs.c

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1029,11 +1029,10 @@ static struct string_list *hide_refs;
10291029

10301030
int parse_hide_refs_config(const char *var, const char *value, const char *section)
10311031
{
1032-
const char *subsection, *key;
1033-
int subsection_len;
1032+
const char *key;
10341033
if (!strcmp("transfer.hiderefs", var) ||
1035-
(!parse_config_key(var, section, &subsection, &subsection_len, &key)
1036-
&& !subsection && !strcmp(key, "hiderefs"))) {
1034+
(!parse_config_key(var, section, NULL, NULL, &key) &&
1035+
!strcmp(key, "hiderefs"))) {
10371036
char *ref;
10381037
int len;
10391038

0 commit comments

Comments
 (0)