Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
WIP: grep: remove racy call to repo_clear()
When grepping with --recurse-submodules, grep_submodule() is invoked for each subrepository to initialize it. At the end of this function, repo_clear() is called to properly remove the subrepo from memory. When grepping with threads, however, the call to this function may happen before the threads have actually finished grepping the subrepo. This could make Git run into a race condition and possible segmentation fault. So let's remove the repo_clear() call. This is not the best solution as it can degrade memory. But to properly handle the subrepo cleaning, we would need to keep a mapping of subrepos' identifiers to the number of objects not grepped yet, or something like this. Signed-off-by: Matheus Tavares <matheus.bernardino@usp.br>
- Loading branch information