From 0d64ba48372f95ade17a27f1b11620638ca52d61 Mon Sep 17 00:00:00 2001 From: yorah Date: Fri, 25 Jan 2013 17:35:46 +0100 Subject: diff: add a notify callback to `git_diff__from_iterators` The callback will be called for each file, just before the `git_delta_t` gets inserted into the diff list. When the callback: - returns < 0, the diff process will be aborted - returns > 0, the delta will not be inserted into the diff list, but the diff process continues - returns 0, the delta is inserted into the diff list, and the diff process continues --- tests-clar/diff/diff_helpers.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'tests-clar/diff/diff_helpers.h') diff --git a/tests-clar/diff/diff_helpers.h b/tests-clar/diff/diff_helpers.h index 49c265285..a43847b79 100644 --- a/tests-clar/diff/diff_helpers.h +++ b/tests-clar/diff/diff_helpers.h @@ -20,6 +20,11 @@ typedef struct { int line_dels; } diff_expects; +typedef struct { + const char *path; + const char *matched_pathspec; +} notify_expected; + extern int diff_file_cb( const git_diff_delta *delta, float progress, -- cgit v1.2.1