mirror of
https://github.com/git/git.git
synced 2024-11-24 02:17:02 +08:00
Merge branch 'ta/pretty-parse-config'
* ta/pretty-parse-config: pretty.c: make git_pretty_formats_config return -1 on git_config_string failure
This commit is contained in:
commit
51eeaea210
4
pretty.c
4
pretty.c
@ -70,7 +70,9 @@ static int git_pretty_formats_config(const char *var, const char *value, void *c
|
||||
|
||||
commit_format->name = xstrdup(name);
|
||||
commit_format->format = CMIT_FMT_USERFORMAT;
|
||||
git_config_string(&fmt, var, value);
|
||||
if (git_config_string(&fmt, var, value))
|
||||
return -1;
|
||||
|
||||
if (starts_with(fmt, "format:") || starts_with(fmt, "tformat:")) {
|
||||
commit_format->is_tformat = fmt[0] == 't';
|
||||
fmt = strchr(fmt, ':') + 1;
|
||||
|
Loading…
Reference in New Issue
Block a user