src/git2


Log

Author Commit Date CI Message
nulltoken 1d8cc731 2011-02-14T22:29:22 Refactored the reference creation API.
Vicent Marti 86194b24 2011-02-18T21:57:53 Split packed from unpacked references These two reference types are now stored separately to eventually allow the removal/renaming of loose references and rewriting of the refs packfile. Signed-off-by: Vicent Marti <tanoku@gmail.com>
Vicent Marti 32054c24 2011-02-18T18:09:19 Brush up the refs API Changed some more API details and updated documentation. Sketched API for addition/removal of entries. Signed-off-by: Vicent Marti <tanoku@gmail.com>
nulltoken 6a0895ad 2011-02-11T13:58:40 Added GIT_EINVALIDREFSTATE error.
nulltoken aa2120e9 2011-02-10T15:08:00 Added git_reference__normalize_name() along with tests.
Vicent Marti 5cfd9ce4 2011-03-01T22:15:20 Add missing include to odb_backends.h Signed-off-by: Vicent Marti <tanoku@gmail.com>
Sakari Jokinen fc70832a 2011-02-23T07:08:50 include "oid.h" in headers that use git_oid This makes generating bindings to hlibgit2 easier
Tim Clem 81d0ff1c 2011-02-14T13:22:44 fix cast in tag.h git_tag_lookup() and git_tag_new() changed to cast GIT_OBJ_TAG to git_otype in order to compile lib in xcode
Vicent Marti d4b5a4e2 2011-02-09T19:49:02 Internal changes on the backend system The priority value for different backends has been removed from the public `git_odb_backend` struct. We handle that internally. The priority value is specified on the `git_odb_add_alternate`. This is convenient because it allows us to poll a backend twice with different priorities without having to instantiate it twice. We also differentiate between main backends and alternates; alternates have lower priority and cannot be written to. These changes come with some unit tests to make sure that the backend sorting is consistent. The libgit2 version has been bumped to 0.4.0. This commit changes the external API: CHANGED: struct git_odb_backend No longer has a `priority` attribute; priority for the backend in managed internally by the library. git_odb_add_backend(git_odb *odb, git_odb_backend *backend, int priority) Now takes an additional priority parameter, the priority that will be given to the backend. ADDED: git_odb_add_alternate(git_odb *odb, git_odb_backend *backend, int priority) Add a backend as an alternate. Alternate backends have always lower priority than main backends, and writing is disabled on them. Signed-off-by: Vicent Marti <tanoku@gmail.com> Signed-off-by: Vicent Marti <tanoku@gmail.com>
Vicent Marti 122c3405 2011-02-07T18:25:42 Git trees are now always lazily sorted Removed `git_tree_add_entry_unsorted`. Now the `git_tree_add_entry` method doesn't sort the entries array by default; entries are only sorted lazily when required. This is done automatically by the library (the `git_tree_sort_entries` call has been removed). This should improve performance. No point on sorting entries all the time, anyway. Signed-off-by: Vicent Marti <tanoku@gmail.com>
Vicent Marti c041af95 2011-02-05T19:45:57 Add support for SQLite backends Configure again the build system to look for SQLite3. If the library is found, the SQLite backend will be automatically compiled. Enjoy *very* fast reads and writes. MASTER PROTIP: Initialize the backend with ":memory" as the path to the SQLite database for fully-hosted in-memory repositories. Rejoice. Signed-off-by: Vicent Marti <tanoku@gmail.com>
Vicent Marti c836c332 2011-02-05T09:29:37 Make more methods return error codes git_revwalk_next now returns an error code when the iteration is over. git_repository_index now returns an error code when the index file could not be opened. Signed-off-by: Vicent Marti <tanoku@gmail.com>
Vicent Marti 5d773a6e 2011-02-05T09:00:09 Merge branch 'master' of https://github.com/jwiegley/libgit2
John Wiegley 89f9fc6f 2011-01-28T02:41:59 Make git_tree_clear_entries visible to the user
John Wiegley 75e051c6 2011-01-27T14:20:23 Added git_tree_add_entry_unsorted and git_tree_sort_entries
Vicent Marti b70e4f8a 2011-02-01T03:21:53 Add required includes in "oid.h" The file was previously failing to be included stand-alone.
Vicent Marti 2f8a8ab2 2011-01-29T01:56:25 Refactor reference parsing code Several changes have been committed to allow the user to create in-memory references and write back to disk. Peeling of symbolic references has been made explicit. Added getter and setter methods for all attributes on a reference. Added corresponding documentation. Signed-off-by: Vicent Marti <tanoku@gmail.com>
nulltoken 9282e921 2010-12-27T20:34:19 Merge nulltoken's reference parsing code All the commits have been squashed into a single one before refactoring the final code, to keep everything tidy. Individual commit messages are as follows: Added repository reference looking up functionality placeholder. Added basic reference database definition and caching infrastructure. Removed useless constant. Added GIT_EINVALIDREFNAME error and description. Added missing description for GIT_EBAREINDEX. Added GIT_EREFCORRUPTED error and description. Added GIT_ETOONESTEDSYMREF error and description. Added resolving of direct and symbolic references. Prepared the packed-refs parsing. Added parsing of the packed-refs file content. When no loose reference has been found, the full content of the packed-refs file is parsed. All of the new (i.e. not previously parsed as a loose reference) references are eagerly stored in the cached references storage. The method packed_reference_file__parse() is in deer need of some refactoring. :-) Extracted to a method the parsing of the peeled target of a tag. Extracted to a method the parsing of a standard packed ref. Fixed leaky removal of the cached references. Ensured that a previously parsed packed reference isn't returned if a more up-to-date loose reference exists. Enhanced documentation of git_repository_reference_lookup(). Moved some refs related constants from repository.c to refs.h. Made parsing of a packed tag reference more robust. Updated git_repository_reference_lookup() documentation. Added some references to the test repository. Added some tests covering tag references looking up. Added some tests covering symbolic and head references looking up. Added some tests covering packed references looking up.
nulltoken f2c24713 2011-01-26T20:29:06 Made path prettifying functions return GIT_EINVALIDPATH instead of GIT_ERROR.
Vicent Marti b29e8f19 2011-01-29T02:12:59 Return the created entry in git_tree_add_entry() Yes, we are breaking the API. Alpha software, deal with it. We need a way of getting a pointer to each newly added entry to the index, because manually looking up the entry after creation is outrageously expensive. Signed-off-by: Vicent Marti <tanoku@gmail.com>
Vicent Marti 37c2d54c 2011-01-20T15:57:13 Fix compilation on MinGW Require <sys/types.h> to find the definition for off64_t. Signed-off-by: Vicent Marti <tanoku@gmail.com>
Vicent Marti ec3c7a16 2011-01-13T04:54:14 Add new Repository initialization method Lets the user specify the ODB that will be used by the repository manually. Signed-off-by: Vicent Marti <tanoku@gmail.com>
Vicent Marti c5846fbf 2011-01-13T04:34:23 Fix typo on Commit API Proper function is 'git_commit_time_offset'. Signed-off-by: Vicent Marti <tanoku@gmail.com>
Vicent Marti e52e38d3 2011-01-12T01:42:07 Move the compat definitions to types.h Don't need a brand new header for two typedefs when we already have a types.h header. Change comment style to ANSI C. Signed-off-by: Vicent Marti <tanoku@gmail.com>
Alex Budovski f0bde7fa 2011-01-11T16:07:45 Revised platform types to use 'best supported' size. This will allow graceful migration to 64 bit file sizes and timestamps should git's binary interface be extended to allow this.
Vicent Marti 073fa812 2011-01-10T05:01:38 Use generic types in git_index_entry Off_t is not cool. It can be 32 or 64 bits depending on the platform, but on the Index format, it's always 32 bits. Signed-off-by: Vicent Marti <tanoku@gmail.com>
Vicent Marti e52ed7a5 2011-01-03T22:34:27 Split object methods from repository.c All the relevant git_object methods have been moved to object.c Signed-off-by: Vicent Marti <tanoku@gmail.com>
Vicent Marti 9f54fe48 2010-12-23T00:15:09 Remove git_errno It was not being used by any methods (only by malloc and calloc), and since it needs to be TLS, it cannot be exported on DLLs on Windows. Burn it with fire. The API always returns error codes! Signed-off-by: Vicent Marti <tanoku@gmail.com>
Vicent Marti 11f6646f 2010-12-22T22:51:24 Export TLS symbols properly in Win32 There was no export definition for GIT_EXTERN_TLS() under MSVC. Signed-off-by: Vicent Marti <tanoku@gmail.com>
Vicent Marti 40c44d2f 2010-12-19T22:50:20 Fix issues in repository initialization Implemented recursive directory creation Fix style issues Signed-off-by: Vicent Marti <tanoku@gmail.com>
Vicent Marti fe93dabe 2010-12-19T21:30:15 Merge branch 'repo-init' of https://github.com/nulltoken/libgit2 into nulltoken-repo-init
Vicent Marti 638c2ca4 2010-12-18T02:10:25 Rename 'git_person' to 'git_signature' The new signature struct is public, and contains information about the timezone offset. Must be free'd manually by the user. Signed-off-by: Vicent Marti <tanoku@gmail.com>
nulltoken d13e7e02 2010-12-17T15:58:30 Added a comment reminding that the gitfo_mkdir_recurs() is far from being fully implemented.
nulltoken e1f8cad0 2010-12-17T14:45:02 Added basic HEAD file creation.
nulltoken 4b8e27c8 2010-12-15T18:25:15 Very first git_repository_init() draft.
nulltoken 13710f1e 2010-12-10T16:30:06 Added timezone offset parsing and outputting.
Vicent Marti a44fc1d4 2010-12-06T23:13:00 Fix type-conversion warnings The types in the git_index_entry struct are now system-defaults, and get truncated to uint32_t's when written back on the index. Signed-off-by: Vicent Marti <tanoku@gmail.com>
Vicent Marti f5918330 2010-12-06T23:08:31 Add license file to all public headers Yes, the public headers do need our license. Signed-off-by: Vicent Marti <tanoku@gmail.com>
Vicent Marti 44908fe7 2010-12-06T23:03:16 Change the library include file Libgit2 is now officially include as #include "<git2.h>" or indidividual files may be included as #include <git2/index.h> Signed-off-by: Vicent Marti <tanoku@gmail.com>