From: Stefan Beller Date: Sun, 11 Sep 2016 05:42:05 GMT Subject: [PATCH 05/10] diff.c: reintroduce diff_flush_patch for all files Message-ID: <1473572530-25764-6-git-send-email-stefanbeller@gmail.com> In-Reply-To: <1473572530-25764-1-git-send-email-stefanbeller@gmail.com> From: Stefan Beller --- diff.c | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/diff.c b/diff.c index 85fb887..87b1bb2 100644 --- a/diff.c +++ b/diff.c @@ -4608,6 +4608,17 @@ void diff_warn_rename_limit(const char *varname, int needed, int degraded_cc) warning(rename_limit_advice, varname, needed); } +static void diff_flush_patch(struct diff_options *o) +{ + int i; + struct diff_queue_struct *q = &diff_queued_diff; + for (i = 0; i < q->nr; i++) { + struct diff_filepair *p = q->queue[i]; + if (check_pair_status(p)) + diff_flush_patch_filepair(p, o); + } +} + void diff_flush(struct diff_options *options) { struct diff_queue_struct *q = &diff_queued_diff; @@ -4702,11 +4713,7 @@ void diff_flush(struct diff_options *options) } } - for (i = 0; i < q->nr; i++) { - struct diff_filepair *p = q->queue[i]; - if (check_pair_status(p)) - diff_flush_patch_filepair(p, options); - } + diff_flush_patch(options); } if (output_format & DIFF_FORMAT_CALLBACK) -- 2.7.4