[PATCH v4 3/8] status: Added missing calls to diff_unmodified_pair() in format_callbacks.

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: =?UTF-8?q?Henrik=20Grubbstr=C3=B6m=20=28Grubba=29?=
Date: Tuesday, April 6, 2010 - 5:46 am

The diff_queue_struct provided by diff_flush() is raw, and needs to be
filtered through diff_unmodified_pair() before being used.
This is already done by most of the other functions operating on
diff_queue_struct called by diff_flush().

Signed-off-by: Henrik Grubbström <grubba@grubba.org>
---
For diff_modified_pair() to be able to do its job, it needs
to be called...

 wt-status.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/wt-status.c b/wt-status.c
index 8ca59a2..e661225 100644
--- a/wt-status.c
+++ b/wt-status.c
@@ -229,6 +229,8 @@ static void wt_status_collect_changed_cb(struct diff_queue_struct *q,
 		struct wt_status_change_data *d;
 
 		p = q->queue[i];
+		if (diff_unmodified_pair(p))
+			continue;
 		it = string_list_insert(p->one->path, &s->change);
 		d = it->util;
 		if (!d) {
@@ -276,6 +278,8 @@ static void wt_status_collect_updated_cb(struct diff_queue_struct *q,
 		struct wt_status_change_data *d;
 
 		p = q->queue[i];
+		if (diff_unmodified_pair(p))
+			continue;
 		it = string_list_insert(p->two->path, &s->change);
 		d = it->util;
 		if (!d) {
-- 
1.7.0.3.316.g33b5e

--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[PATCH v4 0/8] Attribute and conversion patches, =?UTF-8?q?Henrik=20G ..., (Tue Apr 6, 5:46 am)
[PATCH v4 1/8] convert: Safer handling of $Id$ contraction., =?UTF-8?q?Henrik=20G ..., (Tue Apr 6, 5:46 am)
[PATCH v4 2/8] convert: Keep foreign $Id$ on checkout., =?UTF-8?q?Henrik=20G ..., (Tue Apr 6, 5:46 am)
[PATCH v4 3/8] status: Added missing calls to diff_unmodif ..., =?UTF-8?q?Henrik=20G ..., (Tue Apr 6, 5:46 am)
[PATCH v4 4/8] diff: Filter files that have changed only d ..., =?UTF-8?q?Henrik=20G ..., (Tue Apr 6, 5:46 am)
[PATCH v4 5/8] convert: Added core.refilteronadd feature., =?UTF-8?q?Henrik=20G ..., (Tue Apr 6, 5:46 am)
[PATCH v4 6/8] attr: Fixed debug output for macro expansion., =?UTF-8?q?Henrik=20G ..., (Tue Apr 6, 5:46 am)
[PATCH v4 7/8] attr: Allow multiple changes to an attribut ..., =?UTF-8?q?Henrik=20G ..., (Tue Apr 6, 5:46 am)
[PATCH v4 8/8] attr: Expand macros immediately when encoun ..., =?UTF-8?q?Henrik=20G ..., (Tue Apr 6, 5:46 am)
Re: [PATCH v4 3/8] status: Added missing calls to diff_unm ..., Henrik Grubbström, (Mon Apr 12, 6:00 am)
Re: [PATCH v4 4/8] diff: Filter files that have changed on ..., Henrik Grubbström, (Fri Apr 16, 8:30 am)