grep: simplify -p output

It was found a bit too loud to show == separators between the function
headers.

Signed-off-by: Rene Scharfe <rene.scharfe@lsrfire.ath.cx>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
René Scharfe
2009-07-02 00:06:34 +02:00
committed by Junio C Hamano
parent 60ecac98ed
commit ed24e401e0
2 changed files with 6 additions and 10 deletions

View File

@ -285,13 +285,13 @@ static int flush_grep(struct grep_opt *opt,
argc -= 2;
}
if (opt->pre_context || opt->post_context || opt->funcname) {
if (opt->pre_context || opt->post_context) {
/*
* grep handles hunk marks between files, but we need to
* do that ourselves between multiple calls.
*/
if (opt->show_hunk_mark)
write_or_die(1, opt->funcname ? "==\n" : "--\n", 3);
write_or_die(1, "--\n", 3);
else
opt->show_hunk_mark = 1;
}