Add a macro DIFF_QUEUE_CLEAR.
Refactor the diff_queue_struct code, this macro help to reset the structure. Signed-off-by: Bo Yang <struggleyb.nku@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
@ -569,8 +569,7 @@ void diffcore_rename(struct diff_options *options)
|
||||
/* At this point, we have found some renames and copies and they
|
||||
* are recorded in rename_dst. The original list is still in *q.
|
||||
*/
|
||||
outq.queue = NULL;
|
||||
outq.nr = outq.alloc = 0;
|
||||
DIFF_QUEUE_CLEAR(&outq);
|
||||
for (i = 0; i < q->nr; i++) {
|
||||
struct diff_filepair *p = q->queue[i];
|
||||
struct diff_filepair *pair_to_free = NULL;
|
||||
|
Reference in New Issue
Block a user