libgit2.object

Members

Functions

git_object_dup
int git_object_dup(libgit2.types.git_object** dest, libgit2.types.git_object* source)

Create an in-memory copy of a Git object. The copy must be explicitly free'd or it will leak.

git_object_free
void git_object_free(libgit2.types.git_object* object)

Close an open object

git_object_id
const(libgit2.oid.git_oid)* git_object_id(const(libgit2.types.git_object)* obj)

Get the id (SHA1) of a repository object

git_object_lookup
int git_object_lookup(libgit2.types.git_object** object, libgit2.types.git_repository* repo, const(libgit2.oid.git_oid)* id, libgit2.types.git_object_t type)

Lookup a reference to one of the objects in a repository.

git_object_lookup_bypath
int git_object_lookup_bypath(libgit2.types.git_object** out_, const(libgit2.types.git_object)* treeish, const(char)* path, libgit2.types.git_object_t type)

Lookup an object that represents a tree entry.

git_object_lookup_prefix
int git_object_lookup_prefix(libgit2.types.git_object** object_out, libgit2.types.git_repository* repo, const(libgit2.oid.git_oid)* id, size_t len, libgit2.types.git_object_t type)

Lookup a reference to one of the objects in a repository, given a prefix of its identifier (short id).

git_object_owner
libgit2.types.git_repository* git_object_owner(const(libgit2.types.git_object)* obj)

Get the repository that owns this object

git_object_peel
int git_object_peel(libgit2.types.git_object** peeled, const(libgit2.types.git_object)* object, libgit2.types.git_object_t target_type)

Recursively peel an object until an object of the specified type is met.

git_object_rawcontent_is_valid
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)

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.

git_object_rawcontent_is_valid
int git_object_rawcontent_is_valid(int* valid, const(char)* buf, size_t len, libgit2.types.git_object_t type)

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.

git_object_short_id
int git_object_short_id(libgit2.buffer.git_buf* out_, const(libgit2.types.git_object)* obj)

Get a short abbreviated OID string for the object

git_object_string2type
libgit2.types.git_object_t git_object_string2type(const(char)* str)

Convert a string object type representation to it's libgit2.types.git_object_t.

git_object_type
libgit2.types.git_object_t git_object_type(const(libgit2.types.git_object)* obj)

Get the object type of an object

git_object_type2string
const(char)* git_object_type2string(libgit2.types.git_object_t type)

Convert an object type to its string representation.

git_object_typeisloose
int git_object_typeisloose(libgit2.types.git_object_t type)

Determine if the given libgit2.types.git_object_t is a valid loose object type.

Manifest constants

GIT_OBJECT_SIZE_MAX
enum GIT_OBJECT_SIZE_MAX;
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.

Meta

License

GPL-2.0(Linking Exception)