Fix use of mutex in threaded grep
commit5f02d31597df35ca98e9080e12bfbb18dadadcbe
authorJunio C Hamano <gitster@pobox.com>
Tue, 16 Feb 2010 02:34:28 +0000 (15 18:34 -0800)
committerJunio C Hamano <gitster@pobox.com>
Wed, 17 Feb 2010 03:19:05 +0000 (16 19:19 -0800)
tree92dfdf56c3d4fcf08cc5e4568ea57aa28322fdb6
parentb599672316ae0e0cf827e5e2cd6d3bb403d7b8cd
Fix use of mutex in threaded grep

The program can decide at runtime not to use threading even if the support
is compiled in.  In such a case, mutexes are not necessary and left
uninitialized.  But the code incorrectly tried to take and release the
read_sha1_mutex unconditionally.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
Acked-by: Fredrik Kuivinen <frekui@gmail.com>
builtin-grep.c