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)


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