Merge branch 'bw/grep-recurse-submodules' into maint

A broken access to object databases in recent update to "git grep
--recurse-submodules" has been fixed.

* bw/grep-recurse-submodules:
  grep: take the read-lock when adding a submodule
This commit is contained in:
Junio C Hamano 2017-11-15 12:04:55 +09:00
commit fd7c38c793

View File

@ -431,7 +431,9 @@ static int grep_submodule(struct grep_opt *opt, struct repository *superproject,
* store is no longer global and instead is a member of the repository * store is no longer global and instead is a member of the repository
* object. * object.
*/ */
grep_read_lock();
add_to_alternates_memory(submodule.objectdir); add_to_alternates_memory(submodule.objectdir);
grep_read_unlock();
if (oid) { if (oid) {
struct object *object; struct object *object;