git_object_rawcontent_is_valid

Analyzes a buffer of raw object content and determines its validity. Tree, commit, and tag objects will be parsed and ensured that they are valid, parseable content. (Blobs are always valid by definition.) An error message will be set with an informative message if the object is not valid.

@warning This function is experimental and its signature may change in the future.

  1. int git_object_rawcontent_is_valid(int* valid, const(char)* buf, size_t len, libgit2.types.git_object_t object_type, libgit2.oid.git_oid_t oid_type)
    version(GIT_EXPERIMENTAL_SHA256)
    extern (C) nothrow @nogc public
    int
    git_object_rawcontent_is_valid
  2. int git_object_rawcontent_is_valid(int* valid, const(char)* buf, size_t len, libgit2.types.git_object_t type)

Parameters

valid int*

Output pointer to set with validity of the object content

buf const(char)*

The contents to validate

len size_t

The length of the buffer

object_type libgit2.types.git_object_t

The type of the object in the buffer

oid_type libgit2.oid.git_oid_t

The object ID type for the OIDs in the given buffer

Return Value

Type: int

0 on success or an error code

Meta