summaryrefslogtreecommitdiff
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* Properly export all external symbols in Win32Vicent Marti2010-12-226-38/+38
| | | | | | | Some external functions were not being exported because they were using the 'extern' keyword instead of the generic GIT_EXTERN() macro. Signed-off-by: Vicent Marti <tanoku@gmail.com>
* Fix issues in repository initializationVicent Marti2010-12-193-82/+88
| | | | | | | Implemented recursive directory creation Fix style issues Signed-off-by: Vicent Marti <tanoku@gmail.com>
* Merge branch 'repo-init' of https://github.com/nulltoken/libgit2 into ↵Vicent Marti2010-12-194-2/+188
|\ | | | | | | nulltoken-repo-init
| * Added creation of ref/heads/ and refs/tags/ directories.nulltoken2010-12-191-0/+11
| |
| * Prettified HEAD symlink generation.nulltoken2010-12-171-2/+10
| |
| * Added a comment reminding that the gitfo_mkdir_recurs() is far from being ↵nulltoken2010-12-172-1/+2
| | | | | | | | fully implemented.
| * Added basic HEAD file creation.nulltoken2010-12-172-9/+50
| |
| * Made gitfo_mkdir_recurs() more tolerant.nulltoken2010-12-171-1/+8
| | | | | | | | Doesn't err any more when the directory already exists.
| * Added creation of 'objects' and 'refs' directories.nulltoken2010-12-171-0/+15
| |
| * Removed unnecessary git_repository_init_results handling.nulltoken2010-12-171-21/+1
| |
| * Added gitfo_mkdir_recurs() placeholder.nulltoken2010-12-172-0/+6
| |
| * Simplified git_repository_init_results struct.nulltoken2010-12-161-25/+10
| |
| * Very first git_repository_init() draft.nulltoken2010-12-152-0/+132
| |
* | Fixed a nasty bug which was preventing correct generation of the signature.nulltoken2010-12-181-1/+1
| |
* | Merge branch 'timezone'Vicent Marti2010-12-1814-124/+248
|\ \ | |/ |/|
| * Rename 'git_person' to 'git_signature'Vicent Marti2010-12-1814-164/+190
| | | | | | | | | | | | | | 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>
| * Made possible to parse a person with no specified timezone offset.nulltoken2010-12-111-0/+6
| |
| * Added timezone offset parsing and outputting.nulltoken2010-12-108-12/+104
| |
* | Fix initialization & freeing of inexistent reposVicent Marti2010-12-134-8/+33
|/ | | | Signed-off-by: Vicent Marti <tanoku@gmail.com>
* Fixed a memory leak in git_repository_lookup() when provided git_otype is ↵nulltoken2010-12-101-1/+3
| | | | invalid.
* Set short message when changing a commit's messagev0.2.0Vicent Marti2010-12-071-3/+13
| | | | | | Yes, finally. Signed-off-by: Vicent Marti <tanoku@gmail.com>
* Fix type-conversion warningsVicent Marti2010-12-063-13/+18
| | | | | | | 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>
* Add license file to all public headersVicent Marti2010-12-0616-15/+406
| | | | | | Yes, the public headers do need our license. Signed-off-by: Vicent Marti <tanoku@gmail.com>
* Change the library include fileVicent Marti2010-12-0643-62/+62
| | | | | | | | | | | | 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>
* Change include structure for the projectVicent Marti2010-12-0626-275/+370
| | | | | | | | | | | The maze with include dependencies has been fixed. There is now a global include: #include <git.h> The git_odb_backend API has been exposed. Signed-off-by: Vicent Marti <tanoku@gmail.com>
* Decouple storage from ODB logicVicent Marti2010-12-067-1762/+2089
| | | | | | Comes with two default backends: loose object and packfiles. Signed-off-by: Vicent Marti <tanoku@gmail.com>
* Revert changes in odb.c to eventually rebaseVicent Marti2010-12-061-18/+18
| | | | | | The odb.c will disappear after the decoupling changes. Signed-off-by: Vicent Marti <tanoku@gmail.com>
* Small source code readability improvements.nulltoken2010-12-0511-79/+79
| | | | Replaced magic number "0" with GIT_SUCCESS constant wherever it made sense.
* Add 'git_repository_open2' to customize repo foldersVicent Marti2010-12-022-7/+144
| | | | Signed-off-by: Vicent Marti <tanoku@gmail.com>
* Commit parents now use the common 'vector' codeVicent Marti2010-12-024-64/+31
| | | | | | No more linked lists, no more O(n) access. Signed-off-by: Vicent Marti <tanoku@gmail.com>
* Merge branch 'commitparents' of https://github.com/JustinLove/libgit2 into ↵Vicent Marti2010-12-022-0/+45
|\ | | | | | | JustinLove-commitparents
| * add git_commit_parent to retrieve a parent by indexJustin Love2010-11-302-0/+22
| |
| * add git_commit_parentcountJustin Love2010-11-302-0/+23
| |
* | Refactor all 'vector' functions into common codeVicent Marti2010-12-026-200/+306
|/ | | | | | | | | | | | | | | All the operations on the 'git_index_entry' array and the 'git_tree_entry' array have been refactored into common code in the src/vector.c file. The new vector methods support: - insertion: O(1) (avg) - deletion: O(n) - searching: O(logn) - sorting: O(logn) - r. access: O(1) Signed-off-by: Vicent Marti <tanoku@gmail.com>
* Make the bitmasks for Index Entry flags publicVicent Marti2010-11-292-6/+6
| | | | Signed-off-by: Vicent Marti <tanoku@gmail.com>
* Properly write Index Entry 'flags_extended'Vicent Marti2010-11-291-0/+6
| | | | | | Always write the 'flags_extended' attribute to disk if it's available. Signed-off-by: Vicent Marti <tanoku@gmail.com>
* Do proper symbol exports on MSVCVicent Marti2010-11-241-0/+2
| | | | | | | | | Yes, if you are wondering why the shared library was failing to build under MSVC, it's because it was empty. Oh wow. Signed-off-by: Vicent Marti <tanoku@gmail.com>
* Do not use STDINT types in public headersVicent Marti2010-11-241-11/+10
| | | | | | Old versions of MSVC don't have such types available. Signed-off-by: Vicent Marti <tanoku@gmail.com>
* Fix redeclaration warnings in MSVCVicent Marti2010-11-242-1/+5
| | | | Signed-off-by: Vicent Marti <tanoku@gmail.com>
* Removed unreachable code (MSVC warning)Vicent Marti2010-11-241-2/+0
|
* Fix gitfo_isdir() in Win32 systemsVicent Marti2010-11-241-1/+19
| | | | | | Because adhering to the POSIX standards is overrated. Signed-off-by: Vicent Marti <tanoku@gmail.com>
* Fix MSVC warnings and errorsVicent Marti2010-11-242-5/+5
| | | | Signed-off-by: Vicent Marti <tanoku@gmail.com>
* Change blob API to return temp refs to the contentVicent Marti2010-11-202-32/+18
| | | | | | | If the user wants permanent references, he can duplicate the temporary one manually. Signed-off-by: Vicent Marti <tanoku@gmail.com>
* Fix wrong pointer check in git__strdupVicent Marti2010-11-191-1/+1
| | | | Signed-off-by: Vicent Marti <tanoku@gmail.com>
* Fix resizing the index arrayVicent Marti2010-11-171-3/+12
| | | | | | No longer segfaults when resizing an empty array. Signed-off-by: Vicent Marti <tanoku@gmail.com>
* Fix repository initializationVicent Marti2010-11-171-12/+14
| | | | | | | We cannot assume that non-bare repositories have an index file, because 'git index' doesn't create it by default. Signed-off-by: Vicent Marti <tanoku@gmail.com>
* Fix freeing blob objects from the ODBVicent Marti2010-11-161-0/+1
| | | | | | | The internal contents of the blob were being free'd but not the blob object itself. Signed-off-by: Vicent Marti <tanoku@gmail.com>
* Add support for 'index add'Vicent Marti2010-11-165-49/+131
| | | | | | | | Actually add files to the index by creating their corresponding blob and storing it on the repository, then getting the hash and updating the index file. Signed-off-by: Vicent Marti <tanoku@gmail.com>
* Fix overcomplicated return statementVicent Marti2010-11-161-1/+1
| | | | | | Note to self: don't be stupid Signed-off-by: Vicent Marti <tanoku@gmail.com>
* Add support for blob filesVicent Marti2010-11-164-2/+277
| | | | | | | Blob files can now be loaded from the repository like all the other base Git types. Signed-off-by: Vicent Marti <tanoku@gmail.com>