Commit Graph

9 Commits

Author SHA1 Message Date
Vicent Marti
3490188b3c Change the return type of git_blob_rawcontent
Should return `void *` for raw bytes.

Signed-off-by: Vicent Marti <tanoku@gmail.com>
2011-03-05 13:29:50 +02:00
Vicent Marti
f335b42c72 Fix segmentation fault when freeing a repository
Disable garbage collection of cross-references to prevent
double-freeing. Internal reference management is now done
with a separate method.

Signed-off-by: Vicent Marti <tanoku@gmail.com>
2011-03-05 02:05:26 +02:00
Vicent Marti
48c27f86bb Implement reference counting for git_objects
All `git_object` instances looked up from the repository are reference
counted. User is expected to use the new `git_object_close` when an
object is no longer needed to force freeing it.

Signed-off-by: Vicent Marti <tanoku@gmail.com>
2011-03-03 20:23:52 +02:00
Vicent Marti
44908fe763 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>
2010-12-06 23:03:16 +02:00
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
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
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
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
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