|
b76d984e
|
2010-12-11T16:20:57
|
|
Added more person parsing tests.
|
|
5a386e4d
|
2010-12-11T15:50:07
|
|
Added timezone checks to person parsing tests.
|
|
7161beb1
|
2010-12-11T15:38:22
|
|
Fixed too much faked timezone offset.
An offset of more than 14 hours makes no sense (cf. http://www.worldtimezone.com/faq.html).
|
|
fee065a0
|
2010-12-11T15:34:37
|
|
Made possible to parse a person with no specified timezone offset.
|
|
13710f1e
|
2010-12-10T16:30:06
|
|
Added timezone offset parsing and outputting.
|
|
2cd6d686
|
2010-12-10T05:53:39
|
|
Tests now run with the resources folder as a hardcoded path
Each tests expects a "TEST_RESOURCES" define with the full path to the
resources folder.
Signed-off-by: Vicent Marti <tanoku@gmail.com>
|
|
6c14d641
|
2010-12-09T20:55:54
|
|
Fixed a memory leak in git_repository_lookup() when provided git_otype is invalid.
|
|
9de351b2
|
2010-12-09T23:06:02
|
|
Move documentation generation to the Waf system
The new command is './waf doxygen'
Signed-off-by: Vicent Marti <tanoku@gmail.com>
|
|
635cacc6
|
2010-12-08T10:10:48
|
|
fix doxygen setup and automate generation
rakefile for some common tasks and doxygen needs
to look in the new place for headers
|
|
4eec2c0d
|
2010-12-07T03:55:46
|
|
Set short message when changing a commit's message
Yes, finally.
Signed-off-by: Vicent Marti <tanoku@gmail.com>
|
|
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>
|
|
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>
|
|
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>
|
|
d12299fe
|
2010-12-03T22:22:10
|
|
Change include structure for the project
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>
|
|
7d7cd885
|
2010-12-03T18:01:30
|
|
Decouple storage from ODB logic
Comes with two default backends: loose object and packfiles.
Signed-off-by: Vicent Marti <tanoku@gmail.com>
|
|
86bfec39
|
2010-12-06T01:13:09
|
|
Revert changes in odb.c to eventually rebase
The odb.c will disappear after the decoupling changes.
Signed-off-by: Vicent Marti <tanoku@gmail.com>
|
|
6f02c3ba
|
2010-12-05T20:18:56
|
|
Small source code readability improvements.
Replaced magic number "0" with GIT_SUCCESS constant wherever it made sense.
|
|
d3e2dd5e
|
2010-12-04T14:04:12
|
|
Fixed .gitignore typo.
|
|
02286c33
|
2010-12-04T13:58:06
|
|
Added reference to "src/vector.c" to the Visual Studio solution in order to cope with tanoku's latest refactorings.
|
|
0d2eb2d8
|
2010-12-04T13:25:29
|
|
Added some patterns to .gitignore file to filter out some Visual Studio specifics.
|
|
654cd5ff
|
2010-12-02T21:50:28
|
|
Fix segfault in t0603 (unitialized pointer)
Signed-off-by: Vicent Marti <tanoku@gmail.com>
|
|
59995558
|
2010-12-02T21:48:03
|
|
Fix segfault handler in Mac OS X
Signed-off-by: Vicent Marti <tanoku@gmail.com>
|
|
691aa968
|
2010-12-02T18:35:38
|
|
Add 'git_repository_open2' to customize repo folders
Signed-off-by: Vicent Marti <tanoku@gmail.com>
|
|
eec95235
|
2010-12-02T04:58:22
|
|
Commit parents now use the common 'vector' code
No more linked lists, no more O(n) access.
Signed-off-by: Vicent Marti <tanoku@gmail.com>
|
|
41109a7e
|
2010-12-02T04:42:33
|
|
Merge branch 'commitparents' of https://github.com/JustinLove/libgit2 into JustinLove-commitparents
|
|
c4034e63
|
2010-12-02T04:31:54
|
|
Refactor all 'vector' functions into common code
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>
|
|
1e35f929
|
2010-12-02T04:19:14
|
|
Add stack trace to the tests when building with GCC
Signed-off-by: Vicent Marti <tanoku@gmail.com>
|
|
eb095435
|
2010-11-30T21:28:39
|
|
add git_commit_parent to retrieve a parent by index
|
|
12114415
|
2010-11-30T21:01:47
|
|
add git_commit_parentcount
|
|
8c1f9e4d
|
2010-11-29T18:07:17
|
|
Make the bitmasks for Index Entry flags public
Signed-off-by: Vicent Marti <tanoku@gmail.com>
|
|
91e88941
|
2010-11-29T18:06:22
|
|
Properly write Index Entry 'flags_extended'
Always write the 'flags_extended' attribute to disk if it's available.
Signed-off-by: Vicent Marti <tanoku@gmail.com>
|
|
a84972d0
|
2010-11-28T21:53:02
|
|
Add premade solution for compiling in MSVC2010
Signed-off-by: Vicent Marti <tanoku@gmail.com>
|
|
e5fd5b94
|
2010-11-24T17:51:01
|
|
Update README.md
Fix my broken English.
Fix formatting issues in some links.
Add new build flag options.
Signed-off-by: Vicent Marti <tanoku@gmail.com>
|
|
8507ab12
|
2010-11-24T17:49:55
|
|
Improve build system for MSVC
Add options to select architecture and compiler version.
Removed dependency on 'grep'.
Fix debug mode flags being always empty.
Signed-off-by: Vicent Marti <tanoku@gmail.com>
|
|
25e9b4dd
|
2010-11-24T17:48:31
|
|
Do proper symbol exports on MSVC
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>
|
|
322086f9
|
2010-11-24T17:46:46
|
|
Do not use STDINT types in public headers
Old versions of MSVC don't have such types available.
Signed-off-by: Vicent Marti <tanoku@gmail.com>
|
|
c5b97d5a
|
2010-11-23T15:13:04
|
|
update readme to be markdown based
|
|
b97b386d
|
2010-11-24T00:20:59
|
|
Update the README with info about the new buildsys
Signed-off-by: Vicent Marti <tanoku@gmail.com>
|
|
0ef70b4a
|
2010-11-23T23:25:30
|
|
Make the test suite depend on the static library
Signed-off-by: Vicent Marti <tanoku@gmail.com>
|
|
405ac511
|
2010-11-23T22:43:54
|
|
Add --debug flag to toggle debugging
Signed-off-by: Vicent Marti <tanoku@gmail.com>
|
|
277e45f4
|
2010-11-23T22:36:31
|
|
Remove the Makefile from the tests/ folder too
Signed-off-by: Vicent Marti <tanoku@gmail.com>
|
|
824f4acd
|
2010-11-23T22:33:28
|
|
Fix redeclaration warnings in MSVC
Signed-off-by: Vicent Marti <tanoku@gmail.com>
|
|
f8b422b6
|
2010-11-23T22:33:04
|
|
Use the proper Zlib version with MSVC
Signed-off-by: Vicent Marti <tanoku@gmail.com>
|
|
8b0e448f
|
2010-11-23T16:51:18
|
|
Removed unreachable code (MSVC warning)
|
|
43e380a8
|
2010-11-23T15:18:53
|
|
Fix gitfo_isdir() in Win32 systems
Because adhering to the POSIX standards is overrated.
Signed-off-by: Vicent Marti <tanoku@gmail.com>
|
|
6b1eab39
|
2010-11-23T14:36:31
|
|
Fix MSVC warnings and errors
Signed-off-by: Vicent Marti <tanoku@gmail.com>
|
|
5dc2bee1
|
2010-11-23T14:33:46
|
|
Fix compilation in Win32
Currently, libgit2 compiles and passes all tests under MinGW, and
compiles but fails the test suite on MSVC 2010.
Signed-off-by: Vicent Marti <tanoku@gmail.com>
|
|
e06551e5
|
2010-11-22T16:42:21
|
|
Add library dependencies to the build
The libgit2 shared library must be linked with all the dynamic libraries
it depends (z, openssl).
These libraries are now automatically detected during the configuration
phase.
Also, removed the linking dependency on libgit2 which Scott added: if
you link libgit2 with itself, the universe could implode, and we don't
want that to happen.
Signed-off-by: Vicent Marti <tanoku@gmail.com>
|
|
11777089
|
2010-11-21T16:46:05
|
|
add waf artifacts to .gitignore
|
|
c34a044f
|
2010-11-21T16:42:47
|
|
add library includes, remove Makefile and readme update for waf
|
|
d910be21
|
2010-11-21T18:07:28
|
|
Add separate commands for all possible actions
The build script now supports all the required features
Signed-off-by: Vicent Marti <tanoku@gmail.com>
|
|
b2898c45
|
2010-11-21T02:59:53
|
|
Add more features to the build system
- Windows 32 compilation
- Test system
- Shared and static libraries
Signed-off-by: Vicent Marti <tanoku@gmail.com>
|
|
357547fa
|
2010-11-19T17:07:34
|
|
Change to waf as the buildsystem
Signed-off-by: Vicent Marti <tanoku@gmail.com>
|
|
30b171a1
|
2010-11-20T17:37:32
|
|
Change blob API to return temp refs to the content
If the user wants permanent references, he can duplicate the temporary
one manually.
Signed-off-by: Vicent Marti <tanoku@gmail.com>
|
|
69a09b7c
|
2010-11-19T17:17:46
|
|
Fix wrong pointer check in git__strdup
Signed-off-by: Vicent Marti <tanoku@gmail.com>
|
|
c3dd69a9
|
2010-11-17T04:59:11
|
|
Fix resizing the index array
No longer segfaults when resizing an empty array.
Signed-off-by: Vicent Marti <tanoku@gmail.com>
|
|
50dd6ca5
|
2010-11-17T04:58:32
|
|
Fix repository initialization
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>
|
|
d7c7cab8
|
2010-11-16T03:25:26
|
|
Fix memory leak in t0401
Commit object must be internally free'd after each parse attempt, even
it fails.
Signed-off-by: Vicent Marti <tanoku@gmail.com>
|
|
111e3622
|
2010-11-16T03:24:39
|
|
Fix freeing blob objects from the ODB
The internal contents of the blob were being free'd but not the blob
object itself.
Signed-off-by: Vicent Marti <tanoku@gmail.com>
|
|
c3a20d5c
|
2010-11-14T22:11:46
|
|
Add support for 'index add'
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>
|
|
7a3924fc
|
2010-11-14T22:07:48
|
|
Fix overcomplicated return statement
Note to self: don't be stupid
Signed-off-by: Vicent Marti <tanoku@gmail.com>
|
|
237da401
|
2010-11-14T22:06:10
|
|
Add support for blob files
Blob files can now be loaded from the repository like all the other base
Git types.
Signed-off-by: Vicent Marti <tanoku@gmail.com>
|
|
0be42199
|
2010-11-10T13:43:55
|
|
accessor for index entry count
|
|
69f0295c
|
2010-11-06T00:14:18
|
|
Fix compiler warning in commit.c
|
|
1081d909
|
2010-11-05T18:04:46
|
|
Fix parsing of commits that have no newlines in the message.
|
|
4b7483a2
|
2010-11-04T21:24:00
|
|
add initial README file
|
|
3f43678e
|
2010-11-07T01:24:45
|
|
Make the Index API public
Several private methods of the Index API are now public, including the
methods to remove, get and add index entries.
All the methods only take an integer value for the position of the entry
to get/remove. To get or remove entries based on their path names, look
them up first using the git_index_find method.
Signed-off-by: Vicent Marti <tanoku@gmail.com>
|
|
88d035bd
|
2010-11-04T15:08:01
|
|
Update commit_time along with committer.
|
|
f24fa088
|
2010-11-04T15:06:56
|
|
Test that commit attributes are set correctly.
|
|
a8bfce69
|
2010-11-05T03:50:24
|
|
Add string descriptions for all error codes
Old descriptions have been updated and new ones have been added for the
'git_strerror' function.
Signed-off-by: Vicent Marti <tanoku@gmail.com>
|
|
1795f879
|
2010-11-05T03:20:17
|
|
Improve error handling
All initialization functions now return error codes instead of pointers.
Error codes are now properly propagated on most functions. Several new
and more specific error codes have been added in common.h
Signed-off-by: Vicent Marti <tanoku@gmail.com>
|
|
1714826f
|
2010-11-04T01:08:36
|
|
Force PIC on the Makefile
Added -fPIC (position-independent code) to the EXTRA_CFLAGS var in the
Makefile. Required in x64 when building the shared library.
Signed-off-by: Vicent Marti <tanoku@gmail.com>
|
|
1544bc31
|
2010-11-02T16:02:37
|
|
Only require an index for non-bare repos.
|
|
6fd195d7
|
2010-11-02T18:42:42
|
|
Change git_repository initialization to use a path
The constructor to git_repository is now called
'git_repository_open(path)'
and takes a path to a git repository instead of an existing ODB object.
Unit tests have been updated accordingly and the two test repositories
have been merged into one.
Signed-off-by: Vicent Marti <tanoku@gmail.com>
|
|
d80e9d55
|
2010-10-31T06:01:46
|
|
Fix in-memory commit getters trying to parse
Issue 9 on the tracker. The commit object getters for in-memory objects
were trying to parse an inexistant on-disk object when one of the commit
attributes which were still not set was queried.
We now return a NULL value when this happens.
Signed-off-by: Vicent Marti <tanoku@gmail.com>
|
|
57450775
|
2010-10-29T02:44:32
|
|
Do a full parse on commits before modifying them
Before changing the attributes of a commit, make sure that the internal
status is consistent with the one in the repository.
Signed-off-by: Vicent Marti <tanoku@gmail.com>
|
|
a13bc8e7
|
2010-10-29T02:22:38
|
|
Add getter methods for object owners
You can know access the owning repository of any existing object, or the
repository on which a revision walker is working on.
Signed-off-by: Vicent Marti <tanoku@gmail.com>
|
|
aaf68dc4
|
2010-10-29T00:47:53
|
|
Add unit tests for git_odb_read_header
Test the new method by loading all the objects in the sample ODB with a
full-read and a header-only read, and comparing the types and sizes.
Signed-off-by: Vicent Marti <tanoku@gmail.com>
|
|
adc0327a
|
2010-10-29T00:44:15
|
|
Add git_odb_read_header method to the ODB
As requested, git_odb_read_header looks up an object on the ODB, but loads
only the header information (type & size) without loading any of the
actual file contents in memory.
It is significantly faster than doing a git_odb_read if you only need an
object's information and not its contents.
Signed-off-by: Vicent Marti <tanoku@gmail.com>
|
|
58519018
|
2010-10-28T02:07:18
|
|
Fix internal memory management on the library
String mememory is now managed in a much more sane manner.
Fixes include:
- git_person email and name is no longer limited to 64 characters
- git_tree_entry filename is no longer limited to 255 characters
- raw objects are properly opened & closed the minimum amount of
times required for parsing
- unit tests no longer leak
- removed 5 other misc memory leaks as reported by Valgrind
- tree writeback no longer segfaults on rare ocassions
The git_person struct is no longer public. It is now managed by the
library, and getter methods are in place to access its internal
attributes.
Signed-off-by: Vicent Marti <tanoku@gmail.com>
|
|
2d16373c
|
2010-10-12T19:12:50
|
|
msvc: Fix an "conversion, possible loss of data" warning
In particular, msvc complains thus:
t0603-sort.c(23) : warning C4244: 'function' : conversion from \
'time_t' to 'unsigned int', possible loss of data
Note that msvc, by default, defines time_t as a 64-bit type, whereas
srand() is expecting an (32-bit) unsigned int. In order to suppress
the warning, we simply cast the return value of the time() function
call to 'unsigned int'.
Signed-off-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk>
|
|
e3005627
|
2010-10-12T19:11:51
|
|
bswap.h: Add ntohs() and htons() functions
Since commit 70aab459, the msvc and MinGW builds have relied on
the built-in implementation of ntohl() and htonl(), rather than
linking the wsock32 library. The new index manipulation code now
calls ntohs()/htons() in addition to ntohl()/htonl(), so we need
to provide a built-in implementation of the 16-bit functions.
Signed-off-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk>
|
|
0d95f32c
|
2010-10-25T22:26:14
|
|
Change /* to /** at the start of comment blocks in public api so doxygen
will generate documenation and not hide them.
Signed-off-by: Benjamin C Meyer <ben@meyerhome.net>
|
|
0037e491
|
2010-10-25T16:32:16
|
|
Fix spelling mistakes in the documentation.
Signed-off-by: Benjamin C Meyer <ben@meyerhome.net>
|
|
544d1519
|
2010-10-25T16:32:31
|
|
Remove whitespace from the end of the line in documentation.
Signed-off-by: Benjamin C Meyer <ben@meyerhome.net>
|
|
e4def81a
|
2010-10-08T13:52:17
|
|
Fix issue 3 (memory corruption resize_tree_array)
The tree array wasn't being initialized when instantiating a tree object
in memory instead of loading it from disk.
New unit tests added to check for the problem.
Signed-off-by: Vicent Marti <tanoku@gmail.com>
|
|
0ba7a031
|
2010-10-07T00:42:55
|
|
Add unit tests for object write-back
Basic write-back & in-memory editing for objects is now tested in t0403
(commits), t0802 (tags) and t0902 (trees).
Add new helper functions in test_helpers.c to remove the loose objects
created when doing write-back tests.
Signed-off-by: Vicent Marti <tanoku@gmail.com>
|
|
ec25391d
|
2010-10-07T00:20:08
|
|
Add write-back support for Tag files
Tag files can now be created and modified in-memory (all the setter
methods have been implemented), and written back to disk using the
generic git_object_write() method.
Signed-off-by: Vicent Marti <tanoku@gmail.com>
|
|
c4b5bedc
|
2010-10-07T00:07:32
|
|
Fix possible segfaults in src/tree.c (issue 1)
git_tree_entry_byname was dereferencing a NULL pointer when the searched
file couldn't be found on the tree.
New test cases have been added to check for entry access methods.
Signed-off-by: Vicent Marti <tanoku@gmail.com>
|
|
2a884588
|
2010-09-21T17:17:10
|
|
Add write-back support for git_tree
All the setter methods for git_tree have been added, including the
setters for attributes on each git_tree_entry and methods to add/remove
entries of the tree.
Modified trees and trees created in-memory from scratch can be written
back to the repository using git_object_write().
Signed-off-by: Vicent Marti <tanoku@gmail.com>
|
|
d45b4a9a
|
2010-09-20T21:39:11
|
|
Add support for in-memory objects
All repository objects can now be created from scratch in memory using
either the git_object_new() method, or the corresponding git_XXX_new()
for each object.
So far, only git_commits can be written back to disk once created in
memory.
Signed-off-by: Vicent Marti <tanoku@gmail.com>
|
|
0c3596f1
|
2010-09-20T01:57:53
|
|
Add setter methods & write support for git_commit
All the required git_commit_set_XXX methods have been implemented; all
the attributes of a commit object can now be modified in-memory.
The new method git_object_write() automatically writes back the
in-memory changes of any object to the repository. So far it only
supports git_commit objects.
Signed-off-by: Vicent Marti <tanoku@gmail.com>
|
|
e802d8cc
|
2010-09-19T03:53:57
|
|
Implement internal methods to write on sources
The new 'git__source_printf' does an overflow-safe printf on a source
bfufer.
The new 'git__source_write' does an overflow-safe byte write on a source
buffer.
Signed-off-by: Vicent Marti <tanoku@gmail.com>
|
|
f49a2e49
|
2010-09-19T03:21:06
|
|
Give object structures more descriptive names
The 'git_obj' structure is now called 'git_rawobj', since
it represents a raw object read from the ODB.
The 'git_repository_object' structure is now called 'git_object',
since it's the base object class for all objects.
Signed-off-by: Vicent Marti <tanoku@gmail.com>
|
|
a7a7ddbe
|
2010-09-18T19:16:04
|
|
Add generic methods for object writeback
git_repository_object has now several internal methods to write back the
object information in the repository.
- git_repository__dbo_prepare_write()
Prepares the DBO object to be modified
- git_repository__dbo_write()
Writes new bytes to the DBO object
- git_repository__dbo_writeback()
Writes back the changes to the repository
Signed-off-by: Vicent Marti <tanoku@gmail.com>
|
|
46f8566a
|
2010-09-12T23:43:21
|
|
Add methods to access internal attributes in git_repo
Added several methods to access:
- The ODB behind a repo
- The SHA1 id behind a generic repo object
- The type of a generic repo object
Signed-off-by: Vicent Marti <tanoku@gmail.com>
|
|
370ce569
|
2010-08-14T20:35:10
|
|
Fix: do not export custom types in the extern API
Some compilers give linking problems when exporting 'uint32_t' as a
return type in the external API. Use generic types instead.
Signed-off-by: Vicent Marti <tanoku@gmail.com>
|
|
9c9f4fc1
|
2010-08-12T23:40:54
|
|
Add support for manually freeing repo objects
A new method 'git_repository_object_free' allows to manually force the
freeing of a repository object, even though they are still automatically
managed by the repository and don't need to be freed by the user.
Signed-off-by: Vicent Marti <tanoku@gmail.com>
|
|
f2408cc2
|
2010-08-12T19:59:32
|
|
Fix object handling in git_repository
All loaded objects through git_repository_lookup are properly parsed &
free'd on failure.
Signed-off-by: Vicent Marti <tanoku@gmail.com>
|
|
0e465f97
|
2010-08-12T18:47:32
|
|
Add auxiliary method git__hexdump
New function in util.c to do a dump of a buffer's contents in
hexadecimal to stdout.
Signed-off-by: Vicent Marti <tanoku@gmail.com>
|