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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



René Scharfe <rene.scharfe@xxxxxxxxxxxxxx> writes:

>> 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.
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]