mirror of
https://github.com/libgit2/libgit2.git
synced 2026-01-25 02:56:17 +00:00
object: introduce type_is_valid
There's no such thing as a "loose object type" or a "packed object type". There are only object types. Introduce `type_is_valid` and deprecate `typeisloose`.
This commit is contained in:
@@ -665,6 +665,16 @@ GIT_EXTERN(int) git_index_add_frombuffer(
|
||||
*/
|
||||
GIT_EXTERN(size_t) git_object__size(git_object_t type);
|
||||
|
||||
/**
|
||||
* Determine if the given git_object_t is a valid object type.
|
||||
*
|
||||
* @deprecated use `git_object_type_is_valid`
|
||||
*
|
||||
* @param type object type to test.
|
||||
* @return 1 if the type represents a valid object type, 0 otherwise
|
||||
*/
|
||||
GIT_EXTERN(int) git_object_typeisloose(git_object_t type);
|
||||
|
||||
/**@}*/
|
||||
|
||||
/** @name Deprecated Remote Functions
|
||||
|
||||
@@ -180,13 +180,12 @@ GIT_EXTERN(const char *) git_object_type2string(git_object_t type);
|
||||
GIT_EXTERN(git_object_t) git_object_string2type(const char *str);
|
||||
|
||||
/**
|
||||
* Determine if the given git_object_t is a valid loose object type.
|
||||
* Determine if the given git_object_t is a valid object type.
|
||||
*
|
||||
* @param type object type to test.
|
||||
* @return true if the type represents a valid loose object type,
|
||||
* false otherwise.
|
||||
* @return 1 if the type represents a valid loose object type, 0 otherwise
|
||||
*/
|
||||
GIT_EXTERN(int) git_object_typeisloose(git_object_t type);
|
||||
GIT_EXTERN(int) git_object_type_is_valid(git_object_t type);
|
||||
|
||||
/**
|
||||
* Recursively peel an object until an object of the specified type is met.
|
||||
|
||||
Reference in New Issue
Block a user