git_diff_hunk

Structure describing a hunk of a diff.

A hunk is a span of modified lines in a delta along with some stable surrounding context. You can configure the amount of context and other properties of how hunks are generated. Each hunk also comes with a header that described where it starts and ends in both the old and new versions in the delta.

Members

Variables

header
char[.GIT_DIFF_HUNK_HEADER_SIZE] header;

Header text, NUL-byte terminated

header_len
size_t header_len;

Number of bytes in header text

new_lines
int new_lines;

Number of lines in new_file

new_start
int new_start;

Starting line number in new_file

old_lines
int old_lines;

Number of lines in old_file

old_start
int old_start;

Starting line number in old_file

Meta