- 23 Apr, 2013 7 commits
-
-
Nikolai Vladimirov committed
-
Nikolai Vladimirov committed
-
Carlos Martín Nieto committed
-
Carlos Martín Nieto committed
-
Vicent Marti committed
-
- 22 Apr, 2013 33 commits
-
-
Make refcounting atomic
Russell Belfer committed -
Carlos Martín Nieto committed
-
New caching
Vicent Martí committed -
Vicent Marti committed
-
Vicent Marti committed
-
Vicent Marti committed
-
Rename git_packfile_check to git_packfile_alloc since it is now being used more in that capacity. Fix the various places that use it. Consolidate some repeated code in odb_pack.c related to the allocation of a new pack_backend.
Russell Belfer committed -
The indexer was creating a packfile object separately from the code in pack.c which was a problem since I put a call to git_mutex_init into just pack.c. This commit updates the pack function for creating a new pack object (i.e. git_packfile_check()) so that it can be used in both places and then makes indexer.c use the shared initialization routine. There are also a few minor formatting and warning message fixes.
Russell Belfer committed -
Russell Belfer committed
-
This removes the lock from the repository object and changes the internals to use the new atomic git__compare_and_swap to update the _odb, _config, _index, and _refdb variables in a threadsafe manner.
Russell Belfer committed -
This builds on the earlier thread safety work to make it so that setting the odb, index, refdb, or config for a repository is done in a threadsafe manner with minimized locking time. This is done by adding a lock to the repository object and using it to guard the assignment of the above listed pointers. The lock is only held to assign the pointer value. This also contains some minor fixes to the other work with pack files to reduce the time that locks are being held to and fix an apparently memory leak.
Russell Belfer committed -
Russell Belfer committed
-
This unifies the object parse functions into one signature that takes an odb_object.
Russell Belfer committed -
This adds create and free callback to the git_objects_table so that more of the creation and destruction of objects can be table driven instead of using switch statements. This also makes the semantics of certain object creation functions consistent so that we can make better use of function pointers. This also fixes a theoretical error case where an object allocation fails and we end up storing NULL into the cache.
Russell Belfer committed -
This adds some basic tests for the oidmap just to make sure that collisions, etc. are dealt with correctly. This also adds some tests for the new caching that check if items are inserted (or not inserted) properly into the cache, and that the cache can hold up in a multithreaded environment without error.
Russell Belfer committed -
When I was writing threading tests for the new cache, the main error I kept running into was a pack file having it's content unmapped underneath the running thread. This adds a lock around the routines that map and unmap the pack data so that threads can effectively reload the data when they need it. This also required reworking the error handling paths in a couple places in the code which I tried to make consistent.
Russell Belfer committed -
Add a git_cache_set_max_object_size method that does more checking around setting the max object size. Also add a git_cache_size to read the number of objects currently in the cache. This makes it easier to write tests.
Russell Belfer committed -
This uses the odb object accessors so we can change the internals more easily...
Russell Belfer committed -
Vicent Marti committed
-
Vicent Marti committed
-
Vicent Marti committed
-
Vicent Marti committed
-
Vicent Marti committed
-
Vicent Marti committed
-
Vicent Marti committed
-
Vicent Marti committed
-
Vicent Marti committed
-
Vicent Marti committed
-
Do not allow duplicate ODB backends
Vicent Martí committed -
Revamp the refspec handling
Vicent Martí committed -
Conflicts: src/odb.c
Vicent Marti committed -
Vicent Marti committed
-
Create include/git2/sys and move backend APIs there
Vicent Martí committed
-