libgit2

git_diff_patch_num_lines_in_hunk

Version:

Get the number of lines in a hunk.

Signature

int git_diff_patch_num_lines_in_hunk(git_diff_patch *patch, size_t hunk_idx);

Parameters

In
patch

The git_diff_patch object

size_t
In
hunk_idx

Index of the hunk

Returns

int

Number of lines in hunk or -1 if invalid hunk index

Versions