libgit2

git_diff_line_cb

Version:

When iterating over a diff, callback that will be made per text diff line. In this context, the provided range will be NULL.

When printing a diff, callback that will be made to output each line of text. This uses some extra GIT_DIFF_LINE_... constants for output of lines of file and hunk headers.

Signature

typedef int git_diff_line_cb(const git_diff_delta *delta, const git_diff_hunk *hunk, const git_diff_line *line, void *payload);

Parameters

In
delta

the delta that contains the line

In
hunk

the hunk that contains the line

In
line

the line in the diff

void *
In
payload

the user-specified callback payload

Returns

int

0 or an error code

Parameter To

Versions