git_patch_get_hunk

Get the information about a hunk in a patch

Given a patch and a hunk index into the patch, this returns detailed information about that hunk. Any of the output pointers can be passed as null if you don't care about that particular piece of information.

extern (C) nothrow @nogc
int
git_patch_get_hunk

Parameters

out_ const(libgit2_d.diff.git_diff_hunk)**

Output pointer to git_diff_hunk of hunk

lines_in_hunk size_t*

Output count of total lines in this hunk

patch .git_patch*

Input pointer to patch object

hunk_idx size_t

Input index of hunk to get information about

Return Value

Type: int

0 on success, git_error_code.GIT_ENOTFOUND if hunk_idx out of range, <0 on error

Meta