summaryrefslogtreecommitdiff
path: root/config.h
diff options
context:
space:
mode:
authorÆvar Arnfjörð Bjarmason <avarab@gmail.com>2021-09-28 12:56:03 (GMT)
committerJunio C Hamano <gitster@pobox.com>2021-09-28 21:54:15 (GMT)
commit73c5f67071f5448858f7f745e888a4a8aa9fd72f (patch)
tree2d985951ded2bc0fcd6a204d08e24456add8afc0 /config.h
parentcefe983a320c03d7843ac78e73bd513a27806845 (diff)
downloadgit-73c5f67071f5448858f7f745e888a4a8aa9fd72f.zip
git-73c5f67071f5448858f7f745e888a4a8aa9fd72f.tar.gz
git-73c5f67071f5448858f7f745e888a4a8aa9fd72f.tar.bz2
config.c: remove unused git_config_key_is_valid()
The git_config_key_is_valid() function got left behind in a refactoring in a9bcf6586d1 (alias: use the early config machinery to expand aliases, 2017-06-14), It previously had two users when it was added in 9e9de18f1ad (config: silence warnings for command names with invalid keys, 2015-08-24), and after 6a1e1bc0a15 (pager: use callbacks instead of configset, 2016-09-12) only one remained. By removing it we can get rid of the "quiet" branches in this function, as well as cases where "store_key" is NULL, for which there are no other users. Out of the 5 callers of git_config_parse_key() only one needs to pass a non-NULL "size_t *baselen_", so we could remove the third parameter from the public interface. I did not find that potential simplification to be worthwhile. Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'config.h')
-rw-r--r--config.h1
1 files changed, 0 insertions, 1 deletions
diff --git a/config.h b/config.h
index 147f5e0..8b79441 100644
--- a/config.h
+++ b/config.h
@@ -259,7 +259,6 @@ int git_config_set_gently(const char *, const char *);
void git_config_set(const char *, const char *);
int git_config_parse_key(const char *, char **, size_t *);
-int git_config_key_is_valid(const char *key);
/*
* The following macros specify flag bits that alter the behavior