diff: support custom callbacks for output

Users can request the DIFF_FORMAT_CALLBACK output format to get a callback
consisting of the whole diff_queue_struct.

Signed-off-by: Junio C Hamano <junkio@cox.net>
This commit is contained in:
Jeff King
2006-09-07 02:35:42 -04:00
committed by Junio C Hamano
parent 2878836c50
commit 0424558190
2 changed files with 11 additions and 0 deletions

3
diff.c
View File

@ -2587,6 +2587,9 @@ void diff_flush(struct diff_options *options)
}
}
if (output_format & DIFF_FORMAT_CALLBACK)
options->format_callback(q, options, options->format_callback_data);
for (i = 0; i < q->nr; i++)
diff_free_filepair(q->queue[i]);
free_queue: