libgit2

git_patch_num_lines_in_hunk

Version:

Get the number of lines in a hunk.

Signature

int git_patch_num_lines_in_hunk(const git_patch *patch, size_t hunk_idx);

Parameters

In
patch

The git_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