Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2017-11-06 07:11:27 +0300
committerJunio C Hamano <gitster@pobox.com>2017-11-06 07:11:27 +0300
commit2502f018f4cc514b75bdd50c20695d8a35e1d0b5 (patch)
tree48cac8f52214865128da37a745d6c74578784091 /builtin/grep.c
parent51bb4d62a06b0313dd3e4610da8af1bbf9497894 (diff)
parent9560e6245a1a0b7483a57d7018e5b7a852fdba62 (diff)
Merge branch 'bw/grep-recurse-submodules'
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/grep.c')
-rw-r--r--builtin/grep.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/builtin/grep.c b/builtin/grep.c
index 2d65f27d01..5a6cfe6b45 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;