diff options
author | Vicent Marti <vicent@github.com> | 2014-02-28 09:40:17 +0100 |
---|---|---|
committer | Vicent Marti <vicent@github.com> | 2014-02-28 09:40:17 +0100 |
commit | 06d41826b6f85d83e68973e0565978b6b3e8976f (patch) | |
tree | 74ca53d8808a16090bb4df867b38c4a07444f8e1 /src/diff_file.h | |
parent | 1574d3884f020c072f68c08785e199732e438e34 (diff) | |
parent | 6789b7a75d1e24a7f4ce34628c6b4561517f0b73 (diff) | |
download | libgit2-06d41826b6f85d83e68973e0565978b6b3e8976f.tar.gz |
Merge pull request #2146 from libgit2/rb/diff-b2b
Add git_diff_buffers and git_patch_from_buffers
Diffstat (limited to 'src/diff_file.h')
-rw-r--r-- | src/diff_file.h | 20 |
1 files changed, 11 insertions, 9 deletions
diff --git a/src/diff_file.h b/src/diff_file.h index 84bf255aa..4d290ad43 100644 --- a/src/diff_file.h +++ b/src/diff_file.h @@ -31,19 +31,21 @@ extern int git_diff_file_content__init_from_diff( size_t delta_index, bool use_old); -extern int git_diff_file_content__init_from_blob( - git_diff_file_content *fc, - git_repository *repo, - const git_diff_options *opts, - const git_blob *blob, - git_diff_file *as_file); +typedef struct { + const git_blob *blob; + const void *buf; + size_t buflen; + const char *as_path; +} git_diff_file_content_src; + +#define GIT_DIFF_FILE_CONTENT_SRC__BLOB(BLOB,PATH) { (BLOB),NULL,0,(PATH) } +#define GIT_DIFF_FILE_CONTENT_SRC__BUF(BUF,LEN,PATH) { NULL,(BUF),(LEN),(PATH) } -extern int git_diff_file_content__init_from_raw( +extern int git_diff_file_content__init_from_src( git_diff_file_content *fc, git_repository *repo, const git_diff_options *opts, - const char *buf, - size_t buflen, + const git_diff_file_content_src *src, git_diff_file *as_file); /* this loads the blob/file-on-disk as needed */ |