forked from p-ranav/cppgit2
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathnote.hpp
More file actions
38 lines (29 loc) · 712 Bytes
/
Copy pathnote.hpp
File metadata and controls
38 lines (29 loc) · 712 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
38
#pragma once
#include <git2.h>
#include <cppgit2/libgit2_api.hpp>
#include <cppgit2/oid.hpp>
#include <cppgit2/ownership.hpp>
#include <cppgit2/signature.hpp>
#include <string>
namespace cppgit2 {
class note : public libgit2_api {
public:
note();
note(git_note* c_ptr, ownership owner = ownership::libgit2);
~note();
// Get the note author
signature author() const;
// Get the note committer
signature committer() const;
// Get the note object's id
oid id() const;
// Get the note message
std::string message() const;
// Access libgit2 C ptr
const git_note* c_ptr() const;
private:
friend class repository;
git_note* c_ptr_;
ownership owner_;
};
} // namespace cppgit2