summaryrefslogtreecommitdiff
path: root/src/odb.c
diff options
context:
space:
mode:
authorVicent Marti <tanoku@gmail.com>2013-10-22 16:05:47 +0200
committerVicent Marti <tanoku@gmail.com>2013-10-22 16:06:12 +0200
commit98fec8a937b93c6a6a0ad35ccd04af4cfeae1767 (patch)
treecfcde1a96bf914b389eb9def0dafa64621196137 /src/odb.c
parent86774742a9bd3f3d4fc37ab35b2800abffeccfd8 (diff)
downloadlibgit2-98fec8a937b93c6a6a0ad35ccd04af4cfeae1767.tar.gz
Implement `git_odb_object_dup`
Diffstat (limited to 'src/odb.c')
-rw-r--r--src/odb.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/odb.c b/src/odb.c
index b2c138aae..2da9937ff 100644
--- a/src/odb.c
+++ b/src/odb.c
@@ -124,6 +124,13 @@ git_otype git_odb_object_type(git_odb_object *object)
return object->cached.type;
}
+int git_odb_object_dup(git_odb_object **dest, git_odb_object *source)
+{
+ git_cached_obj_incref(source);
+ *dest = source;
+ return 0;
+}
+
void git_odb_object_free(git_odb_object *object)
{
if (object == NULL)