]> git.proxmox.com Git - libgit2.git/commit - src/checkout.c
submodule: remove the per-repo cache
authorCarlos Martín Nieto <cmn@dwim.me>
Mon, 27 Apr 2015 17:27:29 +0000 (19:27 +0200)
committerCarlos Martín Nieto <cmn@dwim.me>
Mon, 22 Jun 2015 15:02:54 +0000 (17:02 +0200)
commitdfda2f68ea9602a6b0d08e36bd48e6a4899b12ff
tree55154c8535a53866661e94e5ec9a335d09698d38
parent0c94deb90f1ce0e8caf171c85522c66ceb37a4ab
submodule: remove the per-repo cache

Having this cache and giving them out goes against our multithreading
guarantees and it makes it impossible to use submodules in a
multi-threaded environment, as any thread can ask for a refresh which
may reallocate some string in the submodule struct which we've accessed
in a different one via a getter.

This makes the submodules behave more like remotes, where each object is
created upon request and not shared except explicitly by the user. This
means that some tests won't pass yet, as they assume they can affect the
submodule objects in the cache and that will affect later operations.
src/checkout.c
src/repository.c
src/repository.h
src/submodule.c
src/submodule.h
tests/submodule/modify.c
tests/submodule/nosubs.c