From b8748c1217445a95d3b29b361b467eb66992f8a7 Mon Sep 17 00:00:00 2001 From: nulltoken Date: Sun, 15 Jul 2012 00:46:26 +0200 Subject: revparse: enhance parsing engine --- src/repository.h | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src/repository.h') diff --git a/src/repository.h b/src/repository.h index 91c69a655..4e03e632b 100644 --- a/src/repository.h +++ b/src/repository.h @@ -98,6 +98,13 @@ struct git_repository { * export */ void git_object__free(void *object); +GIT_INLINE(int) git_object__dup(git_object **dest, git_object *source) +{ + git_cached_obj_incref(source); + *dest = source; + return 0; +} + int git_object__resolve_to_type(git_object **obj, git_otype type); int git_oid__parse(git_oid *oid, const char **buffer_out, const char *buffer_end, const char *header); -- cgit v1.2.1