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.h | |
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.h')
-rw-r--r-- | diffcore.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/diffcore.h b/diffcore.h index fcd00bf27a..5d05deaf68 100644 --- a/diffcore.h +++ b/diffcore.h @@ -92,6 +92,11 @@ struct diff_queue_struct { int alloc; int nr; }; +#define DIFF_QUEUE_CLEAR(q) \ + do { \ + (q)->queue = NULL; \ + (q)->nr = (q)->alloc = 0; \ + } while(0); extern struct diff_queue_struct diff_queued_diff; extern struct diff_filepair *diff_queue(struct diff_queue_struct *, |