diff options
Diffstat (limited to 'src/git2/object.h')
-rw-r--r-- | src/git2/object.h | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/git2/object.h b/src/git2/object.h index f316c5d62..084d11177 100644 --- a/src/git2/object.h +++ b/src/git2/object.h @@ -126,6 +126,20 @@ GIT_EXTERN(git_otype) git_object_string2type(const char *str); */ GIT_EXTERN(int) git_object_typeisloose(git_otype type); +/** + * 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_otype type); + /** @} */ GIT_END_DECL |