summaryrefslogtreecommitdiff
path: root/include/git2/deprecated.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/git2/deprecated.h')
-rw-r--r--include/git2/deprecated.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/include/git2/deprecated.h b/include/git2/deprecated.h
index fec56b18b..df53cf01d 100644
--- a/include/git2/deprecated.h
+++ b/include/git2/deprecated.h
@@ -301,6 +301,18 @@ GIT_EXTERN(int) git_index_add_frombuffer(
#define GIT_OBJ_OFS_DELTA GIT_OBJECT_OFS_DELTA
#define GIT_OBJ_REF_DELTA GIT_OBJECT_REF_DELTA
+/**
+ * Get the size in bytes for the structure which
+ * acts as an in-memory representation of any given
+ * object type.
+ *
+ * For all the core types, this would the equivalent
+ * of calling `sizeof(git_commit)` if the core types
+ * were not opaque on the external API.
+ *
+ * @param type object type to get its size
+ * @return size in bytes of the object
+ */
GIT_EXTERN(size_t) git_object__size(git_object_t type);
/**@}*/