forked from QuantStack/git2cpp
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcommit_wrapper.hpp
More file actions
37 lines (23 loc) · 768 Bytes
/
commit_wrapper.hpp
File metadata and controls
37 lines (23 loc) · 768 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
#pragma once
#include <git2.h>
#include <string>
#include "../wrapper/wrapper_base.hpp"
class commit_wrapper;
using commit_list_wrapper = list_wrapper<commit_wrapper>;
class commit_wrapper : public wrapper_base<git_commit>
{
public:
using base_type = wrapper_base<git_commit>;
~commit_wrapper();
commit_wrapper(commit_wrapper&&) noexcept = default;
commit_wrapper& operator=(commit_wrapper&&) noexcept = default;
operator git_object*() const noexcept;
const git_oid& oid() const;
std::string commit_oid_tostr() const;
std::string summary() const;
commit_list_wrapper get_parents_list() const;
private:
commit_wrapper(git_commit* commit);
friend class repository_wrapper;
friend class reference_wrapper;
};