summaryrefslogtreecommitdiff
path: root/include/git2/diff.h
diff options
context:
space:
mode:
authorEdward Thomson <ethomson@microsoft.com>2014-04-08 17:18:47 -0700
committerEdward Thomson <ethomson@github.com>2016-05-26 11:36:11 -0500
commitd34f68261ef95b517944d4fa89ee13b4a68d3cb4 (patch)
tree686b92a0e7174b891bd4e5a61e480acfc1be5002 /include/git2/diff.h
parent7cb904ba4443c22ff5396769b7d07a7f329c0102 (diff)
downloadlibgit2-d34f68261ef95b517944d4fa89ee13b4a68d3cb4.tar.gz
Patch parsing from patch files
Diffstat (limited to 'include/git2/diff.h')
-rw-r--r--include/git2/diff.h14
1 files changed, 8 insertions, 6 deletions
diff --git a/include/git2/diff.h b/include/git2/diff.h
index c35701a46..f3bb337b7 100644
--- a/include/git2/diff.h
+++ b/include/git2/diff.h
@@ -448,6 +448,8 @@ typedef int (*git_diff_file_cb)(
float progress,
void *payload);
+#define GIT_DIFF_HUNK_HEADER_SIZE 128
+
/**
* When producing a binary diff, the binary data returned will be
* either the deflated full ("literal") contents of the file, or
@@ -499,12 +501,12 @@ typedef int(*git_diff_binary_cb)(
* Structure describing a hunk of a diff.
*/
typedef struct {
- int old_start; /**< Starting line number in old_file */
- int old_lines; /**< Number of lines in old_file */
- int new_start; /**< Starting line number in new_file */
- int new_lines; /**< Number of lines in new_file */
- size_t header_len; /**< Number of bytes in header text */
- char header[128]; /**< Header text, NUL-byte terminated */
+ int old_start; /** Starting line number in old_file */
+ int old_lines; /** Number of lines in old_file */
+ int new_start; /** Starting line number in new_file */
+ int new_lines; /** Number of lines in new_file */
+ size_t header_len; /** Number of bytes in header text */
+ char header[GIT_DIFF_HUNK_HEADER_SIZE]; /** Header text, NUL-byte terminated */
} git_diff_hunk;
/**