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:
Russell Belfer
2012-11-20 16:36:06 -08:00
committed by Ben Straub
parent 54b2a37ac7
commit 793c438559
15 changed files with 225 additions and 221 deletions

View File

@@ -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);