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
2013-11-05move mode_t to filebuf_open instead of _commitEdward Thomson
2013-10-28Merge pull request #1802 from libgit2/cmn/reflog-backendBen Straub
Make reflog part of refdb
2013-10-03Initial iconv hookup for precomposed unicodeRussell Belfer
This hooks up git_path_direach and git_path_dirload so that they will take a flag indicating if directory entry names should be tested and converted from decomposed unicode to precomposed form. This code will only come into play on the Apple platform and even then, only when certain types of filesystems are used. This involved adding a flag to these functions which involved changing a lot of places in the code. This was an opportunity to do a bit of code cleanup here and there, for example, getting rid of the git_futils_cleanupdir_r function in favor of a simple flag to git_futils_rmdir_r to not remove the top level entry. That ended up adding depth tracking during rmdir_r which led to a safety check for infinite directory recursion. Yay. This hasn't actually been tested on the Mac filesystems where the issue occurs. I still need to get test environment for that.
2013-10-03Put hooks in place for precompose in dirload fnRussell Belfer
This doesn't actual do string precompose but it puts the hooks in place into the iterators and the git_path_dirload function so that the actual precompose work is ready to go.
2013-10-02reflog: bring _append and _drop back to the frontendCarlos Martín Nieto
These functions act purely on the reflog data structure.
2013-10-02reflog: move the reflog implementation into refdb_fsCarlos Martín Nieto
References and their logs are logically coupled, let's make it so in the code by moving the fs-based reflog implementation to live next to the fs-based refs one. As part of the change, make the function take names rather than references, as only the names are relevant when looking up and handling reflogs.
2013-09-24'del' instead of 'delete' for the poor C++ usersEdward Thomson
2013-09-11path: Make direach() return EUSER on callback errornulltoken
2013-08-22Convert sortedcache to use rwlockRussell Belfer
This is the first use we have of pthread_rwlock_t in libgit2. Hopefully it won't cause any serious portability problems.
2013-08-22Rewrite refdb_fs using git_sortedcache objectRussell Belfer
This adds thread safety to the refdb_fs by using the new git_sortedcache object and also by relaxing the handling of some filesystem errors where the fs may be changed out from under us. This also adds some new threading tests that hammer on the refdb.
2013-08-21Don't try to pack symbolic refsRussell Belfer
If there were symbolic refs among the loose refs then the code to create packed-refs would fail trying to parse the OID out of them (where Git just skips trying to pack them). This fixes it.
2013-07-22Use pool for loose refdb string allocationsRussell Belfer
Instead of using lots of strdup calls, this adds a memory pool to the loose refs iteration code and uses it for keeping track of the loose refs array. Memory usage could probably be reduced even further by eliminating the vector and just scanning by adding the strlen of each ref, but that would be a more intrusive changes. This also updates the error handling to be more thorough about checking for failed allocations, etc.
2013-07-22git_reference_next_name must match git_reference_nextRussell Belfer
The git_reference_next API silently skips invalid references when scanning the loose refs. The git_reference_next_name API should skip the same ones even though it isn't creating the reference object. This adds a test with a an invalid loose reference and makes sure that both APIs skip the same entries and generate the same results.
2013-06-10Reorganize diff and add basic diff driverRussell Belfer
This is a significant reorganization of the diff code to break it into a set of more clearly distinct files and to document the new organization. Hopefully this will make the diff code easier to understand and to extend. This adds a new `git_diff_driver` object that looks of diff driver information from the attributes and the config so that things like function content in diff headers can be provided. The full driver spec is not implemented in the commit - this is focused on the reorganization of the code and putting the driver hooks in place. This also removes a few #includes from src/repository.h that were overbroad, but as a result required extra #includes in a variety of places since including src/repository.h no longer results in pulling in the whole world.
2013-05-31Make iterators use GIT_ITEROVER & smart advanceRussell Belfer
1. internal iterators now return GIT_ITEROVER when you go past the last item in the iteration. 2. git_iterator_advance will "advance" to the first item in the iteration if it is called immediately after creating the iterator, which allows a simpler idiom for basic iteration. 3. if git_iterator_advance encounters an error reading data (e.g. a missing tree or an unreadable file), it returns the error but also attempts to advance past the invalid data to prevent an infinite loop. Updated all tests and internal usage of iterators to account for these new behaviors.
2013-05-30FreesVicent Marti
2013-05-30...Aaaand this worksVicent Marti
2013-05-30What are the chances, reallyVicent Marti
2013-05-28Liike thisVicent Marti
2013-05-28This refs iterator pleases the gods.Vicent Marti
2013-05-19Initialize loose_deleted before it is used for a check later on.Eitan Adler
2013-05-16Fix trailing whitespacesnulltoken
2013-05-15Unify whitespaces to tabsLinquize
2013-05-11Fix refdb iteration early termination bugRussell Belfer
There was a problem found in the Rugged test suite where the refdb_fs_backend__next function could exit too early in some very specific hashing patterns for packed refs. This ports the Rugged test to libgit2 and then fixes the bug.
2013-05-11Merge pull request #1385 from carlosmn/refs-iterEdward Thomson
Introduce a refs iterator
2013-05-11refs: remove the OID/SYMBOLIC filteringCarlos Martín Nieto
Nobody should ever be using anything other than ALL at this level, so remove the option altogether. As part of this, git_reference_foreach_glob is now implemented in the frontend using an iterator. Backends will later regain the ability of doing the glob filtering in the backend.
2013-05-11refdb_fs: don't crash when the repo doesn't have a pathCarlos Martín Nieto
2013-05-11refs: introduce an iteratorCarlos Martín Nieto
This allows us to get a list of reference names in a loop instead of callbacks.
2013-05-09calloc refs instead of malloc'ing themEdward Thomson
2013-05-02refdb_fs: respect PEELING_STANDARDjk/peeled-refsJeff King
We only set our negative flag for PEELING_FULL; we can fall back to the lesser PEELING_STANDARD if our ref is in the refs/tags/ hierarchy.
2013-05-02refdb_fs: Only strstr the traits lineVicent Marti
2013-05-02refdb_fs: Traits are always surrounded by spacesVicent Marti
This makes parsing easier! :p
2013-05-02refdb_fs: store "cannot be peeled" flag for packed refsVicent Marti
Fixes #1532
2013-05-02refdb_fs: implement the fully-peeled traitVicent Marti
2013-05-02refdb_fs: do not require peeled packed refs to be tagsJeff King
Older versions of git would only write peeled entries for items under refs/tags/. Newer versions will write them for all refs, and we should be prepared to handle that.
2013-05-01refdb: Properly load namespacesVicent Marti
2013-05-01refdb: Proper namespace rootVicent Marti
2013-04-30lol namespacesvmg/namespacesVicent Marti
2013-04-23refs: Better error nameVicent Marti
2013-04-22Further threading fixesRussell Belfer
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.
2013-04-21Move git_reference__alloc to include/git2/sysRussell Belfer
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.
2013-04-21Move refdb_backend to include/git2/sysRussell Belfer
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.
2013-04-20alloc doesn't take a refdb; git_refdb_free nicely in the testsEdward Thomson
2013-04-18refs: Do not union the peelvmg/refs-peelVicent Marti
2013-04-17refs: Add `git_referene_target_peel`Vicent Marti
2013-03-18Several warnings detected by static code analyzer fixedArkadiy Shapkin
Implicit type conversion argument of function to size_t type Suspicious sequence of types castings: size_t -> int -> size_t Consider reviewing the expression of the 'A = B == C' kind. The expression is calculated as following: 'A = (B == C)' Unsigned type is never < 0
2013-03-07immutable references and a pluggable ref databaseEdward Thomson