Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/libgit2.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2014-06-25pack: clean up error returnsCarlos Martín Nieto
Set a message when we fail to lock. Also make the put function void, since it's called from free, which cannot report errors. The only errors we can experience here are internal state corruption, so we assert that we are trying to put a pack which we have previously got.
2014-06-23Share packs across repository instancesCarlos Martín Nieto
Opening the same repository multiple times will currently open the same file multiple times, as well as map the same region of the file multiple times. This is not necessary, as the packfile data is immutable. Instead of opening and closing packfiles directly, introduce an indirection and allocate packfiles globally. This does mean locking on each packfile open, but we already use this lock for the global mwindow list so it doesn't introduce a new contention point.
2013-01-09update copyrightsEdward Thomson
2013-01-06git_mwindow_file_deregister() shouldn't return errorsScott J. Goldman
As a function that appears to only be called on error paths, I don't think it makes sense for it to return an error, or clobber the global giterr. Note that no existing callsites actually check the return code. In my own application, there are errors where the real error ends up being hidden, as git_mwindow_file_deregister() clobbers the global giterr. I'm not sure this error is even relevant?
2012-08-20Make the memory-window conrol structures globalCarlos Martín Nieto
Up to now, the idea was that the user would do all the operations for one repository in the same thread. Thus we could have the memory-mapped window information thread-local and avoid any locking. This is not practical in a few environments, such as Apple's GCD which allocates threads arbitrarily or the .NET CLR, where the OS-level thread can change at any moment. Make the control structure global and protect it with a mutex so we don't depend on the thread currently executing the code.
2012-06-28mwindow: allow memory-window files to deregisterCarlos Martin Nieto
Once a file is registered, there is no way to deregister it, even after the structure that contains it is no longer needed and has been freed. This may be the source of #624. Allow and use the deregister function to remove our file from the global list.
2012-03-15Continue error conversionRussell Belfer
This converts blob.c, fileops.c, and all of the win32 files. Also, various minor cleanups throughout the code. Plus, in testing the win32 build, I cleaned up a bunch (although not all) of the warnings with the 64-bit build.
2012-02-13Update Copyright headerschu
Signed-off-by: schu <schu-github@schulog.org>
2011-11-16threads: Fix the shared global state with TLSVicent Marti
See `global.c` for a description of what we're doing. When libgit2 is built with GIT_THREADS support, the threading system must be explicitly initialized with `git_threads_init()`.
2011-09-19Cleanup legal dataVicent Marti
1. The license header is technically not valid if it doesn't have a copyright signature. 2. The COPYING file has been updated with the different licenses used in the project. 3. The full GPLv2 header in each file annoys me.
2011-08-09Fix compilation in WindowsVicent Marti
2011-08-02Make packfile_unpack_header more genericCarlos Martín Nieto
On the way, store the fd and the size in the mwindow file. Signed-off-by: Carlos Martín Nieto <carlos@cmartin.tk>
2011-08-02Factor out the mmap window codeCarlos Martín Nieto
This code is useful for more things than just the packfile handling code. Factor it out so it can be reused. Signed-off-by: Carlos Martín Nieto <carlos@cmartin.tk>