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>maint
							parent
							
								
									5f95c9f850
								
							
						
					
					
						commit
						aa012e9065
					
				|  | @ -75,7 +75,7 @@ static int notes_rewrite_config(const char *k, const char *v, void *cb) | ||||||
| 		return 0; | 		return 0; | ||||||
| 	} else if (!c->mode_from_env && !strcmp(k, "notes.rewritemode")) { | 	} else if (!c->mode_from_env && !strcmp(k, "notes.rewritemode")) { | ||||||
| 		if (!v) | 		if (!v) | ||||||
| 			config_error_nonbool(k); | 			return config_error_nonbool(k); | ||||||
| 		c->combine = parse_combine_notes_fn(v); | 		c->combine = parse_combine_notes_fn(v); | ||||||
| 		if (!c->combine) { | 		if (!c->combine) { | ||||||
| 			error(_("Bad notes.rewriteMode value: '%s'"), v); | 			error(_("Bad notes.rewriteMode value: '%s'"), v); | ||||||
|  |  | ||||||
		Loading…
	
		Reference in New Issue
	
	 John Keeping
						John Keeping