23class Tag :
public TypedObject<git_tag> {
24 using GitTy = git_tag;
31 const git_oid *
targetId() const noexcept {
return git_tag_target_id(
tag()); }
35 git_object_t
targetType() const noexcept {
return git_tag_target_type(
tag()); }
38 std::string
name() const noexcept {
return git_tag_name(
tag()); }
40 const git_signature *
tagger() const noexcept {
return git_tag_tagger(
tag()); }
42 std::string
message() const noexcept {
return git_tag_message(
tag()); }
45 std::variant<std::monostate, Commit, Tree, Blob>
peel() const noexcept;
48 GitTy *
tag() const noexcept {
return typed(); }
Blob is a representation of a git blob.
Definition Blob.h:16
Commit is a representation of a git commit.
Definition Commit.h:21
static std::string oidToStr(const git_oid &id)
Convert OID id to string.
Definition Helpers.h:20
const Repo & repo() const
Get the Repo this Object lives in.
Definition Object.h:38
The most important Git class.
Definition Repo.h:45
Tag is a representation of a git tag.
Definition Tag.h:23
GitTy * tag() const noexcept
Get the stored pointer to libgit2's git_tag.
Definition Tag.h:48
const git_oid * targetId() const noexcept
Get the OID of the target of this Tag.
Definition Tag.h:31
const git_signature * tagger() const noexcept
Get the tagger of this Tag.
Definition Tag.h:40
std::string targetIdStr() const noexcept
Get the SHA of the target of this Tag.
Definition Tag.h:33
std::variant< std::monostate, Commit, Tree, Blob > peel() const noexcept
Peel this Tag until the underlaying object is found and return that.
std::string name() const noexcept
Get the name of this Tag (the tag proper).
Definition Tag.h:38
std::string message() const noexcept
Get the tag message of this Tag.
Definition Tag.h:42
git_object_t targetType() const noexcept
Get the type of the target of this Tag (GIT_OBJECT_COMMIT, ...).
Definition Tag.h:35
Tree is a representation of a git tree.
Definition Tree.h:27
git_tag * typed() const noexcept
Definition Object.h:83