Vicent Marti
d12299fe22
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>
2010-12-06 01:14:15 +02:00
Vicent Marti
7d7cd8857a
Decouple storage from ODB logic
...
Comes with two default backends: loose object and packfiles.
Signed-off-by: Vicent Marti <tanoku@gmail.com>
2010-12-06 01:14:15 +02:00
Vicent Marti
86bfec39b5
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>
2010-12-06 01:13:09 +02:00
nulltoken
6f02c3bad8
Small source code readability improvements.
...
Replaced magic number "0" with GIT_SUCCESS constant wherever it made sense.
2010-12-05 20:18:56 +01:00
nulltoken
d3e2dd5ea1
Fixed .gitignore typo.
2010-12-04 14:04:12 +01:00
nulltoken
02286c3375
Added reference to "src/vector.c" to the Visual Studio solution in order to cope with tanoku's latest refactorings.
2010-12-04 13:58:06 +01:00
nulltoken
0d2eb2d88b
Added some patterns to .gitignore file to filter out some Visual Studio specifics.
2010-12-04 13:25:29 +01:00
Vicent Marti
654cd5ff7b
Fix segfault in t0603 (unitialized pointer)
...
Signed-off-by: Vicent Marti <tanoku@gmail.com>
2010-12-02 21:50:28 +02:00
Vicent Marti
599955586d
Fix segfault handler in Mac OS X
...
Signed-off-by: Vicent Marti <tanoku@gmail.com>
2010-12-02 21:48:03 +02:00
Vicent Marti
691aa96817
Add 'git_repository_open2' to customize repo folders
...
Signed-off-by: Vicent Marti <tanoku@gmail.com>
2010-12-02 18:35:38 +02:00
Vicent Marti
eec9523513
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>
2010-12-02 04:58:22 +02:00
Vicent Marti
41109a7e7e
Merge branch 'commitparents' of https://github.com/JustinLove/libgit2 into JustinLove-commitparents
2010-12-02 04:42:33 +02:00
Vicent Marti
c4034e63f3
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>
2010-12-02 04:31:54 +02:00
Vicent Marti
1e35f929ef
Add stack trace to the tests when building with GCC
...
Signed-off-by: Vicent Marti <tanoku@gmail.com>
2010-12-02 04:19:14 +02:00
Justin Love
eb095435f3
add git_commit_parent to retrieve a parent by index
2010-11-30 21:28:39 -06:00
Justin Love
12114415ab
add git_commit_parentcount
2010-11-30 21:27:12 -06:00
Vicent Marti
8c1f9e4dc3
Make the bitmasks for Index Entry flags public
...
Signed-off-by: Vicent Marti <tanoku@gmail.com>
2010-11-29 18:07:17 +02:00
Vicent Marti
91e8894150
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>
2010-11-29 18:06:22 +02:00
Vicent Marti
a84972d0c4
Add premade solution for compiling in MSVC2010
...
Signed-off-by: Vicent Marti <tanoku@gmail.com>
2010-11-28 21:54:06 +02:00
Vicent Marti
e5fd5b9429
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>
2010-11-24 17:56:45 +02:00
Vicent Marti
8507ab12cf
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>
2010-11-24 17:56:41 +02:00
Vicent Marti
25e9b4dd44
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>
2010-11-24 17:56:35 +02:00
Vicent Marti
322086f9b1
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>
2010-11-24 17:56:30 +02:00
Scott Chacon
c5b97d5ae6
update readme to be markdown based
2010-11-23 15:20:03 -08:00
Vicent Marti
b97b386dea
Update the README with info about the new buildsys
...
Signed-off-by: Vicent Marti <tanoku@gmail.com>
2010-11-24 00:23:26 +02:00
Vicent Marti
0ef70b4a81
Make the test suite depend on the static library
...
Signed-off-by: Vicent Marti <tanoku@gmail.com>
2010-11-24 00:23:15 +02:00
Vicent Marti
405ac51182
Add --debug flag to toggle debugging
...
Signed-off-by: Vicent Marti <tanoku@gmail.com>
2010-11-24 00:23:15 +02:00
Vicent Marti
277e45f486
Remove the Makefile from the tests/ folder too
...
Signed-off-by: Vicent Marti <tanoku@gmail.com>
2010-11-24 00:23:15 +02:00
Vicent Marti
824f4acde2
Fix redeclaration warnings in MSVC
...
Signed-off-by: Vicent Marti <tanoku@gmail.com>
2010-11-24 00:23:15 +02:00
Vicent Marti
f8b422b6d4
Use the proper Zlib version with MSVC
...
Signed-off-by: Vicent Marti <tanoku@gmail.com>
2010-11-24 00:23:15 +02:00
Vicent Marti
8b0e448f5c
Removed unreachable code (MSVC warning)
2010-11-24 00:23:15 +02:00
Vicent Marti
43e380a88c
Fix gitfo_isdir() in Win32 systems
...
Because adhering to the POSIX standards is overrated.
Signed-off-by: Vicent Marti <tanoku@gmail.com>
2010-11-24 00:23:15 +02:00
Vicent Marti
6b1eab3976
Fix MSVC warnings and errors
...
Signed-off-by: Vicent Marti <tanoku@gmail.com>
2010-11-24 00:23:15 +02:00
Vicent Marti
5dc2bee153
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>
2010-11-24 00:23:15 +02:00
Vicent Marti
e06551e51c
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>
2010-11-24 00:23:15 +02:00
Scott Chacon
1177708930
add waf artifacts to .gitignore
2010-11-24 00:23:14 +02:00
Scott Chacon
c34a044f4e
add library includes, remove Makefile and readme update for waf
2010-11-24 00:23:14 +02:00
Vicent Marti
d910be2105
Add separate commands for all possible actions
...
The build script now supports all the required features
Signed-off-by: Vicent Marti <tanoku@gmail.com>
2010-11-24 00:23:14 +02:00
Vicent Marti
b2898c4500
Add more features to the build system
...
- Windows 32 compilation
- Test system
- Shared and static libraries
Signed-off-by: Vicent Marti <tanoku@gmail.com>
2010-11-24 00:23:14 +02:00
Vicent Marti
357547fa12
Change to waf as the buildsystem
...
Signed-off-by: Vicent Marti <tanoku@gmail.com>
2010-11-24 00:23:14 +02:00
Vicent Marti
30b171a185
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>
2010-11-20 17:37:32 +02:00
Vicent Marti
69a09b7c69
Fix wrong pointer check in git__strdup
...
Signed-off-by: Vicent Marti <tanoku@gmail.com>
2010-11-19 17:17:46 +02:00
Vicent Marti
c3dd69a9e1
Fix resizing the index array
...
No longer segfaults when resizing an empty array.
Signed-off-by: Vicent Marti <tanoku@gmail.com>
2010-11-17 05:16:32 +02:00
Vicent Marti
50dd6ca54c
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>
2010-11-17 05:16:26 +02:00
Vicent Marti
d7c7cab8a4
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>
2010-11-16 03:25:26 +02:00
Vicent Marti
111e362263
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>
2010-11-16 03:24:39 +02:00
Vicent Marti
c3a20d5cab
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>
2010-11-16 02:59:28 +02:00
Vicent Marti
7a3924fc38
Fix overcomplicated return statement
...
Note to self: don't be stupid
Signed-off-by: Vicent Marti <tanoku@gmail.com>
2010-11-16 02:59:24 +02:00
Vicent Marti
237da40181
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>
2010-11-16 02:59:13 +02:00
Scott Chacon
0be421994e
accessor for index entry count
2010-11-11 03:28:46 +02:00