Skip to contentSkip to conversation

config: remove git_config_maybe_bool

PATCH In review Martin Ågren 2 participants 2 messages Sep 5, 2017 – Sep 7, 2017 Documentation

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 config: remove git_config_maybe_bool

The function was deprecated in commit 89576613 ("treewide: deprecate git_config_maybe_bool, use git_parse_maybe_bool", 2017-08-07) and has no users.

---
ma/parse-maybe-bool has been in master for some time and I cannot find any inflight topics which rely on git_config_maybe_bool (neither in pu, nor on the list). Indeed, it would have been easier to kill this function immediately instead of deprecating it.

 Documentation/technical/api-config.txt | 4 ----
 config.h                               | 1 -
 config.c                               | 5 -----
 3 files changed, 10 deletions(-)
Documentation/technical/api-config.txt +0 -4
index 7a83a3a6e..9a778b0ca 100644
@@ -186,10 +186,6 @@ parsing is successful, the return value is the result.
 Same as `git_config_bool`, except that integers are returned as-is, and
 an `is_bool` flag is unset.
 
-`git_config_maybe_bool`::
-Deprecated. Use `git_parse_maybe_bool` instead. They are exactly the
-same, except this function takes an unused argument `name`.
-
 `git_parse_maybe_bool`::
 Same as `git_config_bool`, except that it returns -1 on error rather
 than dying.
config.h +0 -1
index 97471b887..456b3d134 100644
@@ -56,7 +56,6 @@ extern unsigned long git_config_ulong(const char *, const char *);
 extern ssize_t git_config_ssize_t(const char *, const char *);
 extern int git_config_bool_or_int(const char *, const char *, int *);
 extern int git_config_bool(const char *, const char *);
-extern int git_config_maybe_bool(const char *, const char *);
 extern int git_config_string(const char **, const char *, const char *);
 extern int git_config_pathname(const char **, const char *, const char *);
 extern int git_config_set_in_file_gently(const char *, const char *, const char *);
config.c +0 -5
index d0d8ce823..f627657cf 100644
@@ -956,11 +956,6 @@ int git_parse_maybe_bool(const char *value)
 	return -1;
 }
 
-int git_config_maybe_bool(const char *name, const char *value)
-{
-	return git_parse_maybe_bool(value);
-}
-
 int git_config_bool_or_int(const char *name, const char *value, int *is_bool)
 {
 	int v = git_parse_maybe_bool_text(value);
Signature · 1 line
2.14.1.460.g848a19d64
#1 lore raw
Quoted 6 lines · Martin Ågren

The function was deprecated in commit 89576613 ("treewide: deprecate git_config_maybe_bool, use git_parse_maybe_bool", 2017-08-07) and has no users.

---

Thanks. Will queue.