git2wrapC++20 wrapper for libgit2 |
git clone git://git.dimitrijedobrota.com/git2wrap.git |
Log | Files | Refs | README | LICENSE | HACKING | CONTRIBUTING | CODE_OF_CONDUCT | BUILDING |
tag.cpp (901B)
0 #include "git2wrap/tag.hpp"
2 #include "git2wrap/error.hpp"
4 namespace git2wrap
5 {
7 tag::tag(git_tag* tagg, repositoryPtr repo)
8 : m_tag(tagg, git_tag_free)
9 , m_repo(std::move(repo))
10 {
11 }
13 tag tag::dup() const
14 {
15 git_tag* tagg = nullptr;
16 git_tag_dup(&tagg, m_tag.get());
17 return {tagg, m_repo};
18 }
20 oid tag::get_id() const
21 {
22 return oid(git_tag_id(m_tag.get()));
23 }
25 repositoryPtr tag::get_owner() const
26 {
27 return m_repo;
28 }
30 oid tag::get_target_id() const
31 {
32 return oid(git_tag_target_id(m_tag.get()));
33 }
35 object::object_t tag::get_target_type() const
36 {
37 return object::object_t::get(git_tag_target_type(m_tag.get()));
38 }
40 const char* tag::get_name() const
41 {
42 return git_tag_name(m_tag.get());
43 }
45 signature tag::get_tagger() const
46 {
47 return signature(git_tag_tagger(m_tag.get()));
48 }
50 const char* tag::get_message() const
51 {
52 return git_tag_message(m_tag.get());
53 }
55 } // namespace git2wrap