diff options
author | Vicent Marti <vicent@github.com> | 2014-04-18 12:33:19 +0200 |
---|---|---|
committer | Vicent Marti <vicent@github.com> | 2014-04-18 12:33:19 +0200 |
commit | 28fd7206b1359b6564bad3c66382b47a8f2e3eb1 (patch) | |
tree | e0d9204bdfea2a948d94b2b14d382a697b00b6db /src/submodule.c | |
parent | 2bed3553f4595a42d9a6884edc66b991e21f881e (diff) | |
parent | 8303827226db114a1157e6173e731f316c217851 (diff) | |
download | libgit2-28fd7206b1359b6564bad3c66382b47a8f2e3eb1.tar.gz |
Merge pull request #2108 from libgit2/rb/threadsafe-index-iterator
Make index iterator thread safe
Diffstat (limited to 'src/submodule.c')
-rw-r--r-- | src/submodule.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/src/submodule.c b/src/submodule.c index bea096df5..5ddbfe828 100644 --- a/src/submodule.c +++ b/src/submodule.c @@ -1638,8 +1638,7 @@ static int submodule_cache_alloc( return -1; } - cache->submodules = git_strmap_alloc(); - if (!cache->submodules) { + if (git_strmap_alloc(&cache->submodules) < 0) { submodule_cache_free(cache); return -1; } @@ -1694,8 +1693,6 @@ static int submodule_cache_refresh(git_submodule_cache *cache, int refresh) update_gitmod = (wd != NULL) ? git_futils_filestamp_check(&cache->gitmodules_stamp, path.ptr) : (cache->gitmodules_stamp.mtime != 0); - if (update_gitmod < 0) - giterr_clear(); } /* clear submodule flags that are to be refreshed */ |