-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathannotated_commit_wrapper.hpp
More file actions
30 lines (18 loc) · 710 Bytes
/
annotated_commit_wrapper.hpp
File metadata and controls
30 lines (18 loc) · 710 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
#pragma once
#include <string_view>
#include <git2.h>
#include "../wrapper/wrapper_base.hpp"
class annotated_commit_wrapper : public wrapper_base<git_annotated_commit>
{
public:
using base_type = wrapper_base<git_annotated_commit>;
~annotated_commit_wrapper();
annotated_commit_wrapper(annotated_commit_wrapper&&) noexcept = default;
annotated_commit_wrapper& operator=(annotated_commit_wrapper&&) noexcept = default;
const git_oid& oid() const;
std::string_view reference_name() const;
private:
annotated_commit_wrapper(git_annotated_commit* commit);
friend class repository_wrapper;
};
using annotated_commit_list_wrapper = list_wrapper<annotated_commit_wrapper>;