diff options
author | Michele Ballabio <barra_cuda@katamail.com> | 2009-03-18 23:53:27 +0300 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2009-03-19 05:10:40 +0300 |
commit | ba150a3fdce48e4b973db6e153e6b3ffb28a0cea (patch) | |
tree | f893b4b92eabb13812e1553093a5effebe4ba554 | |
parent | 092927c1b01632d030d9d746d36ad6dd02bc3967 (diff) |
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>
-rw-r--r-- | grep.c | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -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); } |