aboutsummaryrefslogtreecommitdiff
path: root/builtin
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2017-11-15 12:04:55 +0900
committerJunio C Hamano <gitster@pobox.com>2017-11-15 12:04:55 +0900
commitfd7c38c7937a25da55943187a29462c3fa7fb487 (patch)
treee40a1c32900fa424de79409b83e40f1cf4f82eb1 /builtin
parent21deee3cabce7d58c50992f57a224e52187a1d26 (diff)
parent9560e6245a1a0b7483a57d7018e5b7a852fdba62 (diff)
downloadgit-fd7c38c7937a25da55943187a29462c3fa7fb487.tar.gz
git-fd7c38c7937a25da55943187a29462c3fa7fb487.tar.xz
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
Diffstat (limited to 'builtin')
-rw-r--r--builtin/grep.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/builtin/grep.c b/builtin/grep.c
index 2d65f27d0..5a6cfe6b4 100644
--- a/builtin/grep.c
+++ b/builtin/grep.c
@@ -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
* object.
*/
+ grep_read_lock();
add_to_alternates_memory(submodule.objectdir);
+ grep_read_unlock();
if (oid) {
struct object *object;