1
0
mirror of https://github.com/git/git.git synced 2024-11-18 19:13:58 +01:00

git log: avoid segfault with --all-match

Avoid a segfault when the command

	git log --all-match

was issued, by ignoring the option.

Signed-off-by: Michele Ballabio <barra_cuda@katamail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
Michele Ballabio 2009-03-18 21:53:27 +01:00 committed by Junio C Hamano
parent 092927c1b0
commit ba150a3fdc

3
grep.c

@ -192,7 +192,8 @@ void compile_grep_patterns(struct grep_opt *opt)
* A classic recursive descent parser would do.
*/
p = opt->pattern_list;
opt->pattern_expression = compile_pattern_expr(&p);
if (p)
opt->pattern_expression = compile_pattern_expr(&p);
if (p)
die("incomplete pattern expression: %s", p->pattern);
}