author | Junio C Hamano <gitster@pobox.com> | |
Sat, 3 Apr 2010 19:28:39 +0000 (12:28 -0700) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Sat, 3 Apr 2010 19:28:39 +0000 (12:28 -0700) |
* rs/threaded-grep-context:
grep: enable threading for context line printing
Conflicts:
grep.c
grep: enable threading for context line printing
Conflicts:
grep.c
1 | 2 | |||
---|---|---|---|---|
builtin/grep.c | patch | | diff1 | | diff2 | | blob | history |
grep.c | patch | | diff1 | | diff2 | | blob | history |
diff --cc builtin/grep.c
Simple merge
diff --cc grep.c
index fdc42062687fa6b8bb77c8d09ed58aee9107692d,e5f06e435f2a8100676cd2a5b78312fcd8631717..543b1d53784c16020dea089f23c431c7f2608425
+++ b/grep.c
const char *name, unsigned lno, char sign)
{
int rest = eol - bol;
- char sign_str[1];
+ char *line_color = NULL;
- sign_str[0] = sign;
if (opt->pre_context || opt->post_context) {
if (opt->last_shown == 0) {
- if (opt->show_hunk_mark)
- opt->output(opt, "--\n", 3);
- } else if (lno > opt->last_shown + 1)
- opt->output(opt, "--\n", 3);
+ if (opt->show_hunk_mark) {
+ output_color(opt, "--", 2, opt->color_sep);
+ opt->output(opt, "\n", 1);
- } else
- opt->show_hunk_mark = 1;
++ }
+ } else if (lno > opt->last_shown + 1) {
+ output_color(opt, "--", 2, opt->color_sep);
+ opt->output(opt, "\n", 1);
+ }
}
opt->last_shown = lno;