startgit

Static page generator for git repositories
git clone git://git.dimitrijedobrota.com/startgit.git
Log | Files | Refs | README | LICENSE | HACKING | CONTRIBUTING | CODE_OF_CONDUCT | BUILDING |

commit.hpp (785B)


1 #pragma once 2 3 #include <git2wrap/commit.hpp> 4 #include <git2wrap/tree.hpp> 5 6 #include "diff.hpp" 7 8 namespace startgit 9 { 10 11 class commit 12 { 13 public: 14 explicit commit(git2wrap::commit cmmt); 15 16 const auto& get() const { return m_commit; } 17 const diff& get_diff() const { return m_diff; } 18 19 std::string get_id() const; 20 std::string get_parent_id() const; 21 size_t get_parentcount() const; 22 std::string get_summary() const; 23 std::string get_time() const; 24 std::string get_time_long() const; 25 int64_t get_time_raw() const; 26 std::string get_author_name() const; 27 std::string get_author_email() const; 28 git2wrap::tree get_tree() const; 29 std::string get_message() const; 30 31 private: 32 static const int shasize = 40; 33 34 git2wrap::commit m_commit; 35 diff m_diff; 36 }; 37 38 } // namespace startgit