summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeff King <peff@peff.net>2017-02-24 16:08:16 -0500
committerJunio C Hamano <gitster@pobox.com>2017-02-24 13:22:12 -0800
commitad8c7cdadd96c66d0adf894250c8f4dd77bb2bee (patch)
tree607ae932342ab3a28615c0b4f80f29db2d38931e
parent48f8d9f7323d0927cd955f129babbf93eda50473 (diff)
downloadgit-jk/parse-config-key-cleanup.tar.gz
parse_hide_refs_config: tell parse_config_key we don't want a subsectionjk/parse-config-key-cleanup
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>
-rw-r--r--refs.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/refs.c b/refs.c
index 92f800e9cd..cb81245579 100644
--- a/refs.c
+++ b/refs.c
@@ -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;