FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
git2cpp/src/wrapper/diff_wrapper.cpp at main · QuantStack/git2cpp · GitHub
QuantStack
git2cpp
Repository navigation
Code
Issues
6
(6)
Pull requests
Actions
Projects
Security and quality
Insights
Expand file tree
Breadcrumbs
git2cpp
/
src
/
wrapper
/
diff_wrapper.cpp
Copy path
More file actions
More file actions
Latest commit
History
History
History
38 lines (31 loc) · 905 Bytes
Breadcrumbs
git2cpp
/
src
/
wrapper
/
diff_wrapper.cpp
Copy path
File metadata and controls
38 lines (31 loc) · 905 Bytes
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
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
#
include
"
../wrapper/diff_wrapper.hpp
"
#
include
"
../utils/git_exception.hpp
"
diff_wrapper::diff_wrapper
(git_diff* diff)
: base_type(diff)
{
}
diff_wrapper::~diff_wrapper
()
{
git_diff_free
(p_resource);
p_resource =
nullptr
;
}
void
diff_wrapper::find_similar
(git_diff_find_options* find_opts)
{
throw_if_error
(
git_diff_find_similar
(p_resource, find_opts));
}
void
diff_wrapper::print
(
git_diff_format_t
format, git_diff_line_cb print_cb,
void
* payload)
{
throw_if_error
(
git_diff_print
(p_resource, format, print_cb, payload));
}
diffstats_wrapper
diff_wrapper::get_stats
()
const
{
git_diff_stats* stats;
throw_if_error
(
git_diff_get_stats
(&stats, *
this
));
return
diffstats_wrapper
(stats);
}
diff_wrapper
diff_wrapper::diff_from_buffer
(git_buf buf)
{
git_diff* diff;
throw_if_error
(
git_diff_from_buffer
(&diff, buf.
ptr
, buf.
size
));
return
diff_wrapper
(diff);
}
Back
|
FazBrowse Home
|
New Git URL