diff options
author | Bo Yang <struggleyb.nku@gmail.com> | 2010-05-06 21:52:27 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2010-05-07 09:34:27 -0700 |
commit | 9ca5df90615aa3c6b60e1bc8f03db6cae98e816c (patch) | |
tree | 807f76999f2c9a7aca03d7b308ae8e36bdfd5658 /diffcore-pickaxe.c | |
parent | 3bf7886705b4ea7189f046fa5258fdf6edcdbe23 (diff) | |
download | git-9ca5df90615aa3c6b60e1bc8f03db6cae98e816c.tar.gz |
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-pickaxe.c')
-rw-r--r-- | diffcore-pickaxe.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/diffcore-pickaxe.c b/diffcore-pickaxe.c index d0ef839700..929de15aa9 100644 --- a/diffcore-pickaxe.c +++ b/diffcore-pickaxe.c @@ -55,8 +55,7 @@ void diffcore_pickaxe(const char *needle, int opts) int i, has_changes; regex_t regex, *regexp = NULL; struct diff_queue_struct outq; - outq.queue = NULL; - outq.nr = outq.alloc = 0; + DIFF_QUEUE_CLEAR(&outq); if (opts & DIFF_PICKAXE_REGEX) { int err; |