libgit2

git_diff_hunk

Version:

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.

Signature

typedef struct git_diff_hunk { int old_start int old_lines int new_start int new_lines size_t header_len char[128] header };

Members

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[128]
header

Header text, NUL-byte terminated

Parameter To

Versions