mirror of
https://github.com/git/git.git
synced 2025-12-12 20:36:24 +01:00
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`
This commit is contained in:
1
config.h
1
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 *);
|
||||
|
||||
Reference in New Issue
Block a user