git2wrap

C++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 (870B)


1 #include "git2wrap/tag.hpp" 2 3 #include "git2wrap/error.hpp" 4 5 namespace git2wrap 6 { 7 8 tag::tag(git_tag* tagg, repositoryPtr repo) 9 : m_tag(tagg, git_tag_free) 10 , m_repo(std::move(repo)) 11 { 12 } 13 14 tag tag::dup() const 15 { 16 git_tag* tagg = nullptr; 17 git_tag_dup(&tagg, m_tag.get()); 18 return {tagg, m_repo}; 19 } 20 21 oid tag::get_id() const 22 { 23 return oid(git_tag_id(m_tag.get())); 24 } 25 26 repositoryPtr tag::get_owner() const 27 { 28 return m_repo; 29 } 30 31 oid tag::get_target_id() const 32 { 33 return oid(git_tag_target_id(m_tag.get())); 34 } 35 36 object_t tag::get_target_type() const 37 { 38 return git_tag_target_type(m_tag.get()); 39 } 40 41 const char* tag::get_name() const 42 { 43 return git_tag_name(m_tag.get()); 44 } 45 46 signature tag::get_tagger() const 47 { 48 return signature(git_tag_tagger(m_tag.get())); 49 } 50 51 const char* tag::get_message() const 52 { 53 return git_tag_message(m_tag.get()); 54 } 55 56 } // namespace git2wrap