mirror of
https://github.com/git/git.git
synced 2024-05-28 15:06:11 +02:00
notes-utils: handle boolean notes.rewritemode correctly
If we carry on after outputting config_error_nonbool then we're guaranteed to dereference a null pointer. Signed-off-by: John Keeping <john@keeping.me.uk> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
parent
5f95c9f850
commit
aa012e9065
|
@ -75,7 +75,7 @@ static int notes_rewrite_config(const char *k, const char *v, void *cb)
|
|||
return 0;
|
||||
} else if (!c->mode_from_env && !strcmp(k, "notes.rewritemode")) {
|
||||
if (!v)
|
||||
config_error_nonbool(k);
|
||||
return config_error_nonbool(k);
|
||||
c->combine = parse_combine_notes_fn(v);
|
||||
if (!c->combine) {
|
||||
error(_("Bad notes.rewriteMode value: '%s'"), v);
|
||||
|
|
Loading…
Reference in New Issue