summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* cache: Max cache size, and evict when the cache fills upvmg/new-cacheVicent Marti2013-04-225-12/+29
|
* tests: Do not warn for unused variableVicent Marti2013-04-221-1/+4
|
* tests: Cleanup commit parse testing codeVicent Marti2013-04-221-22/+23
|
* Consolidate packfile allocation furtherRussell Belfer2013-04-224-45/+41
| | | | | | | 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.
* Make indexer use shared packfile open codeRussell Belfer2013-04-226-56/+37
| | | | | | | | | | | 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.
* Fixes for Windows cas/threading stuffRussell Belfer2013-04-222-11/+15
|
* Add git__compare_and_swap and use itRussell Belfer2013-04-225-106/+95
| | | | | | | 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.
* Further threading fixesRussell Belfer2013-04-228-102/+168
| | | | | | | | | | | | | 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.
* clean up tree pointer castingRussell Belfer2013-04-221-8/+8
|
* Simplify object table parse functionsRussell Belfer2013-04-2210-57/+63
| | | | | This unifies the object parse functions into one signature that takes an odb_object.
* Add callback to git_objects_tableRussell Belfer2013-04-2215-184/+128
| | | | | | | | | | 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.
* Add tests for oidmap and new cache with threadingRussell Belfer2013-04-222-0/+342
| | | | | | | | | 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.
* Add mutex around mapping and unmapping pack filesRussell Belfer2013-04-222-24/+44
| | | | | | | | | | | 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.
* Add range checking around cache optsRussell Belfer2013-04-223-12/+31
| | | | | | | 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.
* Use git_odb_object_data/_size whereever possibleRussell Belfer2013-04-226-17/+28
| | | | | This uses the odb object accessors so we can change the internals more easily...
* Global option settersVicent Marti2013-04-224-6/+20
|
* Clear the cache when there are too many items to expireVicent Marti2013-04-221-1/+20
|
* No longer neededVicent Marti2013-04-221-11/+0
|
* Some statsVicent Marti2013-04-221-0/+21
|
* Per-object max sizeVicent Marti2013-04-222-28/+29
|
* Duplicated type objectVicent Marti2013-04-223-12/+8
|
* What has science done.Vicent Marti2013-04-2216-44/+66
|
* Random evictionVicent Marti2013-04-223-4/+21
|
* Per-object filteringVicent Marti2013-04-222-7/+33
|
* lol this worked first try wtfVicent Marti2013-04-229-139/+184
|
* Merge pull request #1489 from libgit2/vmg/dupe-odb-backendsVicent Martí2013-04-221-9/+32
|\ | | | | Do not allow duplicate ODB backends
| * Merge branch 'development' into vmg/dupe-odb-backendsvmg/dupe-odb-backendsVicent Marti2013-04-2254-833/+1252
| |\ | | | | | | | | | | | | Conflicts: src/odb.c
| * | odb: Disable inode checks for Win32Vicent Marti2013-04-221-0/+4
| | |
| * | odb: Do not allow duplicate on-disk backendsVicent Marti2013-04-191-9/+28
| | |
* | | Merge pull request #1493 from carlosmn/remotesVicent Martí2013-04-2217-211/+454
|\ \ \ | |_|/ |/| | Revamp the refspec handling
| * | refspec: unify the string and parsed dataCarlos Martín Nieto2013-04-206-49/+40
| | | | | | | | | | | | | | | | | | | | | | | | It used to be separate as an attempt to make the querying easier, but it didn't work out that way, so put all the data together. Add git_refspec_string() as well to get the original string, which is now stored alongside the independent parts.
| * | remote: allow querying for refspecsCarlos Martín Nieto2013-04-206-31/+134
| | | | | | | | | | | | | | | | | | | | | | | | Introduce git_remote_{fetch,push}_refspecs() to get a list of refspecs from the remote and rename the refspec-adding functions to a less silly name. Use this instead of the vector index hacks in the tests.
| * | remote: handle multiple refspecsCarlos Martín Nieto2013-04-2014-205/+336
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | A remote can have a multitude of refspecs. Up to now our git_remote's have supported a single one for each fetch and push out of simplicity to get something working. Let the remotes and internal code know about multiple remotes and get the tests passing with them. Instead of setting a refspec, the external users can clear all and add refspecs. This should be enough for most uses, though we're still missing a querying function.
| * | config: allow setting multivars when none exist yetCarlos Martín Nieto2013-04-202-1/+19
| | | | | | | | | | | | | | | Adding a multivar when there are no variables with that name set should set the variable instead of failing.
* | | Merge pull request #1485 from libgit2/include-git2-sysVicent Martí2013-04-2240-531/+748
|\ \ \ | | | | | | | | Create include/git2/sys and move backend APIs there
| * | | Move git_reference__alloc to include/git2/sysRussell Belfer2013-04-219-52/+78
| | | | | | | | | | | | | | | | | | | | | | | | Create a new include/git2/sys/refs.h and move the reference alloc functions there. Also fix some documentation issues and some minor code cleanups.
| * | | Move refdb_backend to include/git2/sysRussell Belfer2013-04-219-114/+119
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This moves most of the refdb stuff over to the include/git2/sys directory, with some minor shifts in function organization. While I was making the necessary updates, I also removed the trailing whitespace in a few files that I modified just because I was there and it was bugging me.
| * | | Move git_commit_create_from_oids into sys/commit.hRussell Belfer2013-04-213-105/+129
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Actually this renames git_commit_create_oid to git_commit_create_from_oids and moves the API declaration to include/git2/sys/commit.h since it is a dangerous API for general use (because it doesn't check that the OID list items actually refer to real objects).
| * | | Added git_commit_create_oidJohn Wiegley2013-04-212-10/+60
| | | |
| * | | Move some low-level repo fns to include/git2/sysRussell Belfer2013-04-216-72/+101
| | | |
| * | | Added git_repository_new functionJohn Wiegley2013-04-212-0/+14
| | | |
| * | | Move odb_backend implementors stuff into git2/sysRussell Belfer2013-04-2115-182/+225
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This moves some of the odb_backend stuff that is related to the internals of an odb_backend implementation into include/git2/sys. Some of the stuff related to streaming I left in include/git2 because it seemed like it would be reasonably needed by a normal user who wanted to stream objects into and out of the ODB. Also, I added APIs for traversing the list of backends so that some of the tests would not need to access ODB internals.
| * | | Move git_config_backend to include/git2/sysRussell Belfer2013-04-216-50/+76
| | | | | | | | | | | | | | | | | | | | | | | | Moving backend implementor objects into include/git2/sys so the APIs can be isolated from the ones that normal libgit2 users would be likely to use.
* | | | Merge pull request #1495 from jasperla/developmentVicent Martí2013-04-211-0/+2
|\ \ \ \ | |/ / / |/| | | Add missing prototype for p_realpath().
| * | | Add missing prototype for p_realpath().Jasper Lievisse Adriaanse2013-04-221-0/+2
|/ / /
* | | Merge pull request #1494 from nulltoken/fix/mailmapVicent Martí2013-04-211-0/+11
|\ \ \ | |/ / |/| | mailmap: Coalesce some identities
| * | mailmap: Coalesce some identitiesnulltoken2013-04-211-0/+11
|/ /
* | Plug a couple of leaksCarlos Martín Nieto2013-04-201-0/+4
| |
* | Merge pull request #1491 from ethomson/backends_dont_refdbVicent Martí2013-04-2010-37/+38
|\ \ | | | | | | alloc doesn't take a refdb
| * | alloc doesn't take a refdb; git_refdb_free nicely in the testsEdward Thomson2013-04-1910-37/+38
|/ /