mirror of
https://git.proxmox.com/git/libgit2
synced 2025-05-03 04:01:41 +00:00
replace 'out' with 'patch',replace the literal tabs with '\t'.
This commit is contained in:
parent
4f5a3f400b
commit
8086b78be0
@ -267,7 +267,7 @@ static void parse_opts(struct opts *o, int argc, char *argv[])
|
|||||||
/** Display diff output with "--numstat".*/
|
/** Display diff output with "--numstat".*/
|
||||||
static void diff_print_numstat(git_diff *diff)
|
static void diff_print_numstat(git_diff *diff)
|
||||||
{
|
{
|
||||||
git_patch *out;
|
git_patch *patch;
|
||||||
const git_diff_delta *delta;
|
const git_diff_delta *delta;
|
||||||
size_t i;
|
size_t i;
|
||||||
size_t ndeltas;
|
size_t ndeltas;
|
||||||
@ -275,13 +275,13 @@ static void diff_print_numstat(git_diff *diff)
|
|||||||
ndeltas = git_diff_num_deltas(diff);
|
ndeltas = git_diff_num_deltas(diff);
|
||||||
for (i = 0; i < ndeltas; i++){
|
for (i = 0; i < ndeltas; i++){
|
||||||
check_lg2(
|
check_lg2(
|
||||||
git_patch_from_diff(&out, diff, i),
|
git_patch_from_diff(&patch, diff, i),
|
||||||
"generating patch from diff", NULL);
|
"generating patch from diff", NULL);
|
||||||
check_lg2(
|
check_lg2(
|
||||||
git_patch_line_stats(NULL, &nadditions, &ndeletions, out),
|
git_patch_line_stats(NULL, &nadditions, &ndeletions, patch),
|
||||||
"generating the number of additions and deletions", NULL);
|
"generating the number of additions and deletions", NULL);
|
||||||
delta = git_patch_get_delta(out);
|
delta = git_patch_get_delta(patch);
|
||||||
printf("%u %u %s\n", nadditions, ndeletions, delta->new_file.path);
|
printf("%u\t%u\t%s\n", nadditions, ndeletions, delta->new_file.path);
|
||||||
}
|
}
|
||||||
git_patch_free(out);
|
git_patch_free(patch);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user