-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathpatch_wrapper.hpp
More file actions
32 lines (22 loc) · 651 Bytes
/
patch_wrapper.hpp
File metadata and controls
32 lines (22 loc) · 651 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
#pragma once
#include <string>
#include <git2.h>
#include "../wrapper/wrapper_base.hpp"
class patch_wrapper : public wrapper_base<git_patch>
{
public:
using base_type = wrapper_base<git_patch>;
~patch_wrapper();
patch_wrapper(patch_wrapper&&) noexcept = default;
patch_wrapper& operator=(patch_wrapper&&) noexcept = default;
git_buf to_buf();
static patch_wrapper patch_from_files(
const std::string& path1,
const std::string& file1_str,
const std::string& path2,
const std::string& file2_str,
git_diff_options* diffopts
);
private:
patch_wrapper(git_patch* patch);
};