summaryrefslogtreecommitdiff
path: root/diff.c
diff options
context:
space:
mode:
authorJeff King <peff@peff.net>2006-09-07 02:35:42 -0400
committerJunio C Hamano <junkio@cox.net>2006-09-07 15:40:25 -0700
commit0424558190fb85e6702e7c64cd2b11bc31d7be85 (patch)
treec528b7993f5483d4177422ca98f584775f5e99c9 /diff.c
parent2878836c5074be92b913c95446b94bbf1c9a9e1d (diff)
downloadgit-0424558190fb85e6702e7c64cd2b11bc31d7be85.tar.gz
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>
Diffstat (limited to 'diff.c')
-rw-r--r--diff.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/diff.c b/diff.c
index 9dcbda3117..a3ebc62ec1 100644
--- a/diff.c
+++ b/diff.c
@@ -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: