Skip to content

Commit fd7c38c

Browse files
committed
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
2 parents 21deee3 + 9560e62 commit fd7c38c

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

builtin/grep.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -431,7 +431,9 @@ static int grep_submodule(struct grep_opt *opt, struct repository *superproject,
431431
* store is no longer global and instead is a member of the repository
432432
* object.
433433
*/
434+
grep_read_lock();
434435
add_to_alternates_memory(submodule.objectdir);
436+
grep_read_unlock();
435437

436438
if (oid) {
437439
struct object *object;

0 commit comments

Comments
 (0)