forked from QuantStack/git2cpp
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsignature_wrapper.hpp
More file actions
35 lines (24 loc) · 885 Bytes
/
signature_wrapper.hpp
File metadata and controls
35 lines (24 loc) · 885 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
#pragma once
#include <utility>
#include <string_view>
#include <git2.h>
#include "../wrapper/wrapper_base.hpp"
class commit_wrapper;
class repository_wrapper;
class signature_wrapper : public wrapper_base<git_signature>
{
public:
using author_committer_signatures = std::pair<signature_wrapper, signature_wrapper>;
~signature_wrapper();
signature_wrapper(signature_wrapper&&) = default;
signature_wrapper& operator=(signature_wrapper&&) = default;
std::string_view name() const;
std::string_view email() const;
git_time when() const;
static author_committer_signatures get_default_signature_from_env(repository_wrapper&);
static signature_wrapper get_commit_author(const commit_wrapper&);
static signature_wrapper get_commit_committer(const commit_wrapper&);
private:
signature_wrapper() = default;
bool m_ownership=true;
};