summaryrefslogtreecommitdiff
path: root/config.h
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2018-05-08 06:59:27 (GMT)
committerJunio C Hamano <gitster@pobox.com>2018-05-08 06:59:27 (GMT)
commit00bb99c424e90b6533170a034b7cbc7ff2e85e50 (patch)
tree0a37a6794ca54fb31e3b35b0c2f31be2c542e825 /config.h
parente3e042b185ce3037acb61382da53521ac0beebbf (diff)
parent63e2a0f8e9cc3d66137a72e424a8b59f1c4dbd79 (diff)
downloadgit-00bb99c424e90b6533170a034b7cbc7ff2e85e50.zip
git-00bb99c424e90b6533170a034b7cbc7ff2e85e50.tar.gz
git-00bb99c424e90b6533170a034b7cbc7ff2e85e50.tar.bz2
Merge branch 'tb/config-default'
"git config --get" learned the "--default" option, to help the calling script. Building on top of the tb/config-type topic, the "git config" learns "--type=color" type. Taken together, you can do things like "git config --get foo.color --default blue" and get the ANSI color sequence for the color given to foo.color variable, or "blue" if the variable does not exist. * tb/config-default: builtin/config: introduce `color` type specifier config.c: introduce 'git_config_color' to parse ANSI colors builtin/config: introduce `--default`
Diffstat (limited to 'config.h')
-rw-r--r--config.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/config.h b/config.h
index 5a2394d..cdac2fc 100644
--- a/config.h
+++ b/config.h
@@ -84,6 +84,7 @@ extern int git_config_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_expiry_date(timestamp_t *, const char *, const char *);
+extern int git_config_color(char *, const char *, const char *);
extern int git_config_set_in_file_gently(const char *, const char *, const char *);
extern void git_config_set_in_file(const char *, const char *, const char *);
extern int git_config_set_gently(const char *, const char *);