Commit Graph

56 Commits

Author SHA1 Message Date
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
5de079b86d Change the object creation/lookup API
The methods previously known as

	git_repository_lookup
	git_repository_newobject
	git_repository_lookup_ref

are now part of their respective namespaces:

	git_object_lookup
	git_object_new
	git_reference_lookup

This makes the API more consistent with the new references API.

Signed-off-by: Vicent Marti <tanoku@gmail.com>
2011-03-03 20:23:52 +02:00
Vicent Marti
17cdf25208 Make some Object methods take a const parameter
Signed-off-by: Vicent Marti <tanoku@gmail.com>
2011-03-03 20:23:50 +02:00
Vicent Marti
5d773a6ee8 Merge branch 'master' of https://github.com/jwiegley/libgit2 2011-02-05 09:01:10 +02:00
John Wiegley
bf3389b930 Fixed bug where git__source_printf needs multiple attempts 2011-02-01 05:57:45 -05:00
Vicent Marti
e52ed7a559 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>
2011-01-03 22:34:27 +02:00