diff options
| author | Edward Thomson <ethomson@github.com> | 2016-04-21 00:04:14 -0400 |
|---|---|---|
| committer | Edward Thomson <ethomson@github.com> | 2016-05-26 13:01:08 -0500 |
| commit | 17572f67ed9a3eb57b981d97468bd216d571bf10 (patch) | |
| tree | 32d2fbccb9644c50f02cea2cd4da0c69ef0af980 /src/patch_parse.h | |
| parent | 9be638ecf0d64ec98b3fd16f2d983a86d1aca131 (diff) | |
| download | libgit2-17572f67ed9a3eb57b981d97468bd216d571bf10.tar.gz | |
git_patch_parse_ctx: refcount the context
Diffstat (limited to 'src/patch_parse.h')
| -rw-r--r-- | src/patch_parse.h | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/src/patch_parse.h b/src/patch_parse.h new file mode 100644 index 000000000..d5e86073f --- /dev/null +++ b/src/patch_parse.h @@ -0,0 +1,25 @@ +/* + * Copyright (C) the libgit2 contributors. All rights reserved. + * + * This file is part of libgit2, distributed under the GNU GPL v2 with + * a Linking Exception. For full terms see the included COPYING file. + */ +#ifndef INCLUDE_patch_parse_h__ +#define INCLUDE_patch_parse_h__ + +/** + * Create a patch for a single file from the contents of a patch buffer. + * + * @param out The patch to be created + * @param contents The contents of a patch file + * @param contents_len The length of the patch file + * @param opts The git_patch_options + * @return 0 on success, <0 on failure. + */ +extern int git_patch_from_buffer( + git_patch **out, + const char *contents, + size_t contents_len, + const git_patch_options *opts); + +#endif |
