/** * ggit_tag_get_target: * @tag: a #GgitTag. * @error: a #GError for error reporting, or %NULL. * * Gets the target #GgitObject of @tag. * * This method performs a repository lookup for the * given object and returns it. * * Returns: (transfer full): the target #GgitObject of the tag. */ GgitObject * ggit_tag_get_target (GgitTag *tag, GError **error) { GgitObject *object = NULL; git_tag *t; git_object *obj; gint ret; g_return_val_if_fail (GGIT_IS_TAG (tag), NULL); g_return_val_if_fail (error == NULL || *error == NULL, NULL); t = _ggit_native_get (tag); ret = git_tag_target (&obj, t); if (ret != GIT_OK) { _ggit_error_set (error, ret); } else { object = ggit_utils_create_real_object (obj, TRUE); } return object; }
/** * ggit_tag_get_target: * @tag: a #GgitTag. * @error: a #GError for error reporting, or %NULL. * * Gets the target #GgitObject of @tag. * * This method performs a repository lookup for the * given object and returns it. * * Returns: (transfer full): the target #GgitObject of the tag. */ GgitObject * ggit_tag_get_target (GgitTag *tag, GError **error) { GgitObject *object = NULL; git_tag *t; git_object *obj; gint ret; g_return_val_if_fail (GGIT_IS_TAG (tag), NULL); g_return_val_if_fail (error == NULL || *error == NULL, NULL); t = (git_tag *)GGIT_OBJECT (tag)->priv->obj; ret = git_tag_target (&obj, t); if (ret != GIT_SUCCESS) { _ggit_error_set (error, ret); } else { object = ggit_utils_create_real_object (obj); } return object; }
/** * ggit_tag_get_message: * @tag: a #GgitTag. * * Gets the message of @tag. * * Returns: the message of the tag. */ const gchar * ggit_tag_get_message (GgitTag *tag) { git_tag *t; g_return_val_if_fail (GGIT_IS_TAG (tag), NULL); t = _ggit_native_get (tag); return git_tag_message (t); }
/** * ggit_tag_get_message: * @tag: a #GgitTag. * * Gets the message of @tag. * * Returns: the message of the tag. */ const gchar * ggit_tag_get_message (GgitTag *tag) { git_tag *t; g_return_val_if_fail (GGIT_IS_TAG (tag), NULL); t = (git_tag *)GGIT_OBJECT (tag)->priv->obj; return git_tag_message (t); }
/** * ggit_tag_get_tagger: * @tag: a #GgitTag. * * Get the tagger (author) of @tag. The returned value must be free with * g_object_unref(). * * Returns: (transfer full): the tagger (author) of the tag. */ GgitSignature * ggit_tag_get_tagger (GgitTag *tag) { const git_signature *signature; git_tag *t; g_return_val_if_fail (GGIT_IS_TAG (tag), NULL); t = _ggit_native_get (tag); signature = git_tag_tagger (t); return _ggit_signature_wrap ((git_signature *)signature, NULL, FALSE); }
/** * ggit_tag_get_target_id: * @tag: a #GgitTag. * * Gets the target #GgitOId of @tag. * * Returns: (transfer full): the target #GgitOId of the tag. */ GgitOId * ggit_tag_get_target_id (GgitTag *tag) { const git_oid *oid; git_tag *t; g_return_val_if_fail (GGIT_IS_TAG (tag), NULL); t = _ggit_native_get (tag); oid = git_tag_target_id (t); return _ggit_oid_wrap ((git_oid *)oid); }
/** * ggit_tag_get_tagger: * @tag: a #GgitTag. * * Get the tagger (author) of @tag. The returned value must be free with * ggit_signature_free(). * * Returns: (transfer full): the tagger (author) of the tag. */ GgitSignature * ggit_tag_get_tagger (GgitTag *tag) { const git_signature *signature; git_tag *t; g_return_val_if_fail (GGIT_IS_TAG (tag), NULL); t = (git_tag *)GGIT_OBJECT (tag)->priv->obj; signature = git_tag_tagger (t); return _ggit_signature_wrap ((git_signature *)signature); }
/** * ggit_tag_get_target_oid: * @tag: a #GgitTag. * * Gets the target #GgitOId of @tag. * * Returns: (transfer full): the target #GgitOId of the tag. */ GgitOId * ggit_tag_get_target_oid (GgitTag *tag) { const git_oid *oid; git_tag *t; g_return_val_if_fail (GGIT_IS_TAG (tag), NULL); t = (git_tag *)GGIT_OBJECT (tag)->priv->obj; oid = git_tag_target_oid (t); return _ggit_oid_new ((git_oid *)oid); }