Thread (1 message) 1 message, 1 author, 2016-06-15

Re: [PATCH 1/3 v4] Add a macro DIFF_QUEUE_CLEAR.

From: Junio C Hamano <hidden>
Date: 2016-06-15 22:49:14

Sven Verdoolaege [off-list ref] writes:
On Thu, May 06, 2010 at 09:52:27PM -0700, Bo Yang wrote:
quoted
Refactor the diff_queue_struct code, this macro help
to reset the structure.
[..]
quoted
diff --git a/diff.c b/diff.c
index e40c127..4a350e3 100644
--- a/diff.c
+++ b/diff.c
@@ -2540,6 +2540,7 @@ static void run_checkdiff(struct diff_filepair *p, struct diff_options *o)
 void diff_setup(struct diff_options *options)
 {
 	memset(options, 0, sizeof(*options));
+	memset(&diff_queued_diff, 0, sizeof(diff_queued_diff));
 
What's this line for?
I don't think this change is warranted.  The macro was supposed to reduce
the repetition of assignment to q->queue, q->nr and q->alloc, and nothing
else.

Also the commit messages in this series are unreadable---I should have
been a bit more careful.

Sorry and thanks for noticing.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help