mirror of
https://github.com/libgit2/libgit2.git
synced 2026-01-25 02:56:17 +00:00
Update diff callback param order
This makes the diff functions that take callbacks both take the payload parameter after the callback function pointers and pass the payload as the last argument to the callback function instead of the first. This should make them consistent with other callbacks across the API.
This commit is contained in:
committed by
Ben Straub
parent
54b2a37ac7
commit
793c438559
@@ -63,12 +63,12 @@ char *colors[] = {
|
||||
};
|
||||
|
||||
static int printer(
|
||||
void *data,
|
||||
const git_diff_delta *delta,
|
||||
const git_diff_range *range,
|
||||
char usage,
|
||||
const char *line,
|
||||
size_t line_len)
|
||||
size_t line_len,
|
||||
void *data)
|
||||
{
|
||||
int *last_color = data, color = 0;
|
||||
|
||||
@@ -225,9 +225,9 @@ int main(int argc, char *argv[])
|
||||
fputs(colors[0], stdout);
|
||||
|
||||
if (compact)
|
||||
check(git_diff_print_compact(diff, &color, printer), "Displaying diff");
|
||||
check(git_diff_print_compact(diff, printer, &color), "Displaying diff");
|
||||
else
|
||||
check(git_diff_print_patch(diff, &color, printer), "Displaying diff");
|
||||
check(git_diff_print_patch(diff, printer, &color), "Displaying diff");
|
||||
|
||||
if (color >= 0)
|
||||
fputs(colors[0], stdout);
|
||||
|
||||
Reference in New Issue
Block a user