Commit e8c5eb55 by Russell Belfer

No need to lock newly created tgt in copy

parent b37359aa
...@@ -130,9 +130,6 @@ int git_sortedcache_copy( ...@@ -130,9 +130,6 @@ int git_sortedcache_copy(
return -1; return -1;
} }
if (git_sortedcache_lock(tgt) < 0)
goto fail;
git_vector_foreach(&src->items, i, src_item) { git_vector_foreach(&src->items, i, src_item) {
if (git_sortedcache_upsert( if (git_sortedcache_upsert(
&tgt_item, tgt, ((char *)src_item) + src->item_path_offset) < 0) &tgt_item, tgt, ((char *)src_item) + src->item_path_offset) < 0)
...@@ -141,7 +138,6 @@ int git_sortedcache_copy( ...@@ -141,7 +138,6 @@ int git_sortedcache_copy(
goto fail; goto fail;
} }
git_sortedcache_unlock(tgt);
git_sortedcache_unlock(src); git_sortedcache_unlock(src);
*out = tgt; *out = tgt;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment