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-01iconv: Do not fake an API when iconv is not availableVicent Marti
2013-10-28Merge pull request #1802 from libgit2/cmn/reflog-backendBen Straub
Make reflog part of refdb
2013-10-09After iconv init reset ref normalize errorRussell Belfer
The iconv init was accidentally clearing the default error state during reference normalization. This resets so that normalization errors will be detected correctly.
2013-10-09Make reference lookups apply precomposeunicodeRussell Belfer
Before these changes, looking up a reference would return the same precomposed or decomposed form of the reference name that was used to look it up, so on MacOS which ignores the difference between the two, a single reference could be looked up either way and git_reference_name would return the form of the name that was used to look it up! This change makes lookup always return the precomposed name if core.precomposeunicode is set regardless of which version was used to look it up. The reference iterator was already returning the precomposed form from earlier work. This also updates the CMakeLists.txt rules for enabling iconv usage because the clar tests for this code were actually not being activated properly with the old version. Finally, this moves git_repository_reset_filesystem from include/ git2/repository.h to include/git2/sys/repository.h since it is not really a function that normal library users should have to think about very often.
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-08-28Merge pull request #1805 from libgit2/threading-packed-loadVicent Martí
Thread safety for the refdb_fs
2013-08-26refs: add git_reference_is_tagNikolai Vladimirov
2013-08-22Add internal ref set_name fn instead of reallocRussell Belfer
The refdb_fs implementation calls realloc directly on a reference object when it wants to rename it. It is not a public object, so this doesn't mess with the immutability of references, but it does assume certain constraints on the reference representation. This commit wraps that assumption in an isolated API to isolate it.
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-06-03Merge pull request #1624 from libgit2/vmg/full-ref-iteratorVicent Martí
Breaking RefDB changes
2013-05-31Merge pull request #1559 from carlosmn/ref-shorthandVicent Martí
Introduce git_reference_shorthand
2013-05-30RefcountingVicent Marti
2013-05-30...Aaaand this worksVicent Marti
2013-05-30What are the chances, reallyVicent Marti
2013-05-28Liike thisVicent Marti
2013-05-11Merge pull request #1385 from carlosmn/refs-iterEdward Thomson
Introduce a refs iterator
2013-05-11Introduce a glob-filtering iteratorCarlos Martín Nieto
If the backend doesn't provide support for it, the matching is done in refdb on top of a normal 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-11refs: implement _foreach with the iteratorCarlos 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-08Introduce git_reference_shorthandCarlos Martín Nieto
Generate a shorthand name out of the full refname.
2013-05-08Expose git_reference_dwimCarlos Martín Nieto
Extract this function out of the rev-parse code to be able to DWIM a reference instead of its target.
2013-05-02Error messages for a couple other boundary conditionsRussell Belfer
2013-04-30Merge pull request #1518 from arrbee/export-oid-comparisonVicent Martí
Remove most inlines from the public API
2013-04-30Make git_oid_cmp public and add git_oid__cmpRussell Belfer
2013-04-28Parse shorthand refspecs as validCarlos Martín Nieto
Relax the ONELEVEL ref naming rules so the refspec parsing code can ask for 'master' to be considered valid.
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-18refs: Check alloc is cleanerVicent Marti
2013-04-17refs: Add `git_referene_target_peel`Vicent Marti
2013-04-10object: Export git_object_dupVicent 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-15Fix various build warningsRussell Belfer
This fixes various build warnings on Mac and Windows (64-bit).
2013-03-07immutable references and a pluggable ref databaseEdward Thomson
2013-03-07refs: explicitly catch leading slashesCarlos Martín Nieto
It's somewhat common to try to write "/refs/tags/something". There is no easy way to catch it during the main body of the function, as there is no way to distinguish whether it's a leading slash or a double slash somewhere in the middle. Catch this at the beginning so we don't trigger the assert in is_all_caps_and_underscore().
2013-02-27Fix portability issues on WindowsRussell Belfer
The new tests were not taking core.filemode into account when testing file modes after repo initialization. Fixed that and some other Windows warnings that have crept in.
2013-02-22branch: Make git_branch_remote_name() cope with orphaned headsnulltoken
2013-02-16Clear up warnings from cppcheckRussell Belfer
The cppcheck static analyzer generates warnings for a bunch of places in the libgit2 code base. All the ones fixed in this commit are actually false positives, but I've reorganized the code to hopefully make it easier for static analysis tools to correctly understand the structure. I wouldn't do this if I felt like it was making the code harder to read or worse for humans, but in this case, these fixes don't seem too bad and will hopefully make it easier for better analysis tools to get at any real issues.
2013-02-12remote: Introduce git_remote_is_valid_name()nulltoken
Fix libgit2/libgit2sharp#318
2013-02-12refs: No component of a refname can end with '.lock'nulltoken
2013-01-31refs: handle ALLOW_ONELEVEL normalization with leading slashCarlos Martín Nieto
A leading slash confuses the name normalization code when the flags include ALLOW_ONELEVEL. Catch this case in particular to avoid triggering an assertion in the uppercase check which expects us not to pass it an empty string. The existing tests don't catch this as they simply use the NORMAL flag. This fixes #1300.
2013-01-23Allow peeled references without trailing newline at end of fileScott J. Goldman
Also ammends one of the tag tests to make sure it's working.
2013-01-23Revert "Handle packed peeled objects without trailing newlines"Scott J. Goldman
This reverts commit 28b1cdf3a1bdcd37cf9d550c92b8c19b1782ea6b. //cc #1262 #1267
2013-01-22Handle packed peeled objects without trailing newlinesScott J. Goldman
Fixes #1262
2013-01-17branch: Introduce git_branch_tracking_name()nulltoken
2013-01-09update copyrightsEdward Thomson
2013-01-05Handle packed refs with no trailing newlineno-newline-packed-refsScott J. Goldman
I saw a repo in the wild today which had a master branch ref which was packed, but had no trailing newline. Git handled it fine, but libgit2 choked on it. Fix seems simple enough. If we don't see a newline, assume the end of the buffer is the end of the ref line.
2012-12-28Invalid ref name normalization leaked memoryRussell Belfer
When normalizing a reference name, if there is an error because the name is invalid, then the memory allocated for storing the name could be leaked if the caller was not careful and assumed that the error return code meant that no allocation had occurred. This fixes that by explicitly deallocating the reference name buffer if there is an error in normalizing the name.