git_patch_line_stats

Get line counts of each type in a patch.

This helps imitate a diff --numstat type of output. For that purpose, you only need the total_additions and total_deletions values, but we include the total_context line count in case you want the total number of lines of diff output that will be generated.

All outputs are optional. Pass null if you don't need a particular count.

extern (C) nothrow @nogc
int
git_patch_line_stats
(,,,
const(.git_patch)* patch
)

Parameters

total_context size_t*

Count of context lines in output, can be null.

total_additions size_t*

Count of addition lines in output, can be null.

total_deletions size_t*

Count of deletion lines in output, can be null.

patch const(.git_patch)*

The git_patch object

Return Value

Type: int

0 on success, <0 on error

Meta