Unify code paths of threaded greps
commit685359cf2d1996aed2f1b1e2857528819d27105d
authorJohannes Schindelin <johannes.schindelin@gmx.de>
Sat, 12 Jun 2010 16:32:11 +0000 (12 11:32 -0500)
committerJunio C Hamano <gitster@pobox.com>
Sun, 13 Jun 2010 16:15:11 +0000 (13 09:15 -0700)
tree844dd76bc91fcb50e9672325f840ef2dcf4afac0
parent30d00c395e3fb9f104a3f4a85f06a039c989cd8d
Unify code paths of threaded greps

There were three awfully similar code paths ending the threaded grep. It
is better to avoid duplicated code, though.

This change might very well prevent a race, where the grep patterns were
free()d before waiting that all threads finished.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin/grep.c