Thread (5 messages) flat view 5 messages, 3 authors, 2016-06-15

Re: [RFC][PATCH] grep: enable threading for context line printing

From: Junio C Hamano <hidden>
Date: 2016-06-15 22:48:26

René Scharfe [off-list ref] writes:
quoted
Symbolic constants for the magic values 0, 1, and 2 would make the
code more readable.
Yes, that was a bit too complicated.  I shuffled the code around a bit,
so the patch is now a bit smaller and avoids introducing value 2 for
show_hunk_mark.  Better?
I guess.

I still cannot shake off this nagging feeling that the complication mainly
comes from the way threaded support was written as if the control flow is
the same as that of the single-threaded implementation (e.g. grep_object()
and friends are called from a one-path-at-a-time loop and pretend as if
they have returned some meaningful results indicating they have found a
match), and the logic may become more clear if the flow was restructured.

But I haven't tried, so I dunno.  Your patch does not make the situation
worse, and looks like the right thing to do at the moment.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help