summaryrefslogtreecommitdiff
path: root/diffcore-rename.c
diff options
context:
space:
mode:
authorBo Yang <struggleyb.nku@gmail.com>2010-05-07 04:52:27 (GMT)
committerJunio C Hamano <gitster@pobox.com>2010-05-07 16:34:27 (GMT)
commit9ca5df90615aa3c6b60e1bc8f03db6cae98e816c (patch)
tree807f76999f2c9a7aca03d7b308ae8e36bdfd5658 /diffcore-rename.c
parent3bf7886705b4ea7189f046fa5258fdf6edcdbe23 (diff)
downloadgit-9ca5df90615aa3c6b60e1bc8f03db6cae98e816c.zip
git-9ca5df90615aa3c6b60e1bc8f03db6cae98e816c.tar.gz
git-9ca5df90615aa3c6b60e1bc8f03db6cae98e816c.tar.bz2
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>
Diffstat (limited to 'diffcore-rename.c')
-rw-r--r--diffcore-rename.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/diffcore-rename.c b/diffcore-rename.c
index d6fd3ca..df41be5 100644
--- a/diffcore-rename.c
+++ b/diffcore-rename.c
@@ -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;