Andrew's git
/
gitweb.git
/ diff
summary
|
log
|
commit
| diff |
tree
commit
grep
author
committer
pickaxe
?
re
Merge branch 'nm/grep-object-sha1-lock'
author
Junio C Hamano
<gitster@pobox.com>
Wed, 5 Oct 2011 19:35:53 +0000
(12:35 -0700)
committer
Junio C Hamano
<gitster@pobox.com>
Wed, 5 Oct 2011 19:35:53 +0000
(12:35 -0700)
* nm/grep-object-sha1-lock:
grep: Fix race condition in delta_base_cache
Conflicts:
builtin/grep.c
builtin/grep.c
patch
|
blob
|
history
raw
(from parent 1:
1b840a5
)
diff --git
a/builtin/grep.c
b/builtin/grep.c
index 1c359c2671536287d97f2049b27a390d33b51e88..a286692e467710d92346ab6900e98f1126cb967d 100644
(file)
--- a/
builtin/grep.c
+++ b/
builtin/grep.c
@@
-598,8
+598,11
@@
static int grep_object(struct grep_opt *opt, const struct pathspec *pathspec,
struct strbuf base;
int hit, len;
+ read_sha1_lock();
data = read_object_with_reference(obj->sha1, tree_type,
&size, NULL);
+ read_sha1_unlock();
+
if (!data)
die(_("unable to read tree (%s)"), sha1_to_hex(obj->sha1));