summaryrefslogtreecommitdiff
path: root/include/git2/diff.h
diff options
context:
space:
mode:
authorEdward Thomson <ethomson@github.com>2016-04-25 00:35:48 -0400
committerEdward Thomson <ethomson@github.com>2016-05-26 13:01:09 -0500
commit7166bb16659790ae2b398e1e95c752f784f6f1d3 (patch)
tree1cc3a26e908ed54f579f5595332ba62bbba5a49c /include/git2/diff.h
parent94e488a056942f1bb1ebbe7c9f0c693937726609 (diff)
downloadlibgit2-7166bb16659790ae2b398e1e95c752f784f6f1d3.tar.gz
introduce `git_diff_from_buffer` to parse diffs
Parse diff files into a `git_diff` structure.
Diffstat (limited to 'include/git2/diff.h')
-rw-r--r--include/git2/diff.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/include/git2/diff.h b/include/git2/diff.h
index 065a786e9..880292a1f 100644
--- a/include/git2/diff.h
+++ b/include/git2/diff.h
@@ -1174,6 +1174,11 @@ GIT_EXTERN(int) git_diff_buffers(
git_diff_line_cb line_cb,
void *payload);
+GIT_EXTERN(int) git_diff_from_buffer(
+ git_diff **out,
+ const char *content,
+ size_t content_len);
+
/**
* This is an opaque structure which is allocated by `git_diff_get_stats`.
* You are responsible for releasing the object memory when done, using the