diff options
author | Brandon Williams <bmwill@google.com> | 2017-10-31 11:19:10 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2017-11-01 11:51:30 +0900 |
commit | b2100e529171f0bbd497366618436cf86c08a324 (patch) | |
tree | c2369ba71d4f376463923d1af622a4ae15e2b18f /revision.c | |
parent | 23dcf77f48feb49c54bad09210f093a799816334 (diff) | |
download | git-b2100e529171f0bbd497366618436cf86c08a324.tar.gz |
diff: remove DIFF_OPT_CLR macro
Remove the `DIFF_OPT_CLR` macro and instead set the flags directly.
This conversion is done using the following semantic patch:
@@
expression E;
identifier fld;
@@
- DIFF_OPT_CLR(&E, fld)
+ E.flags.fld = 0
@@
type T;
T *ptr;
identifier fld;
@@
- DIFF_OPT_CLR(ptr, fld)
+ ptr->flags.fld = 0
Signed-off-by: Brandon Williams <bmwill@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'revision.c')
-rw-r--r-- | revision.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/revision.c b/revision.c index f019dd2770..6bb8735014 100644 --- a/revision.c +++ b/revision.c @@ -455,7 +455,7 @@ static int rev_compare_tree(struct rev_info *revs, } tree_difference = REV_TREE_SAME; - DIFF_OPT_CLR(&revs->pruning, HAS_CHANGES); + revs->pruning.flags.HAS_CHANGES = 0; if (diff_tree_oid(&t1->object.oid, &t2->object.oid, "", &revs->pruning) < 0) return REV_TREE_DIFFERENT; @@ -471,7 +471,7 @@ static int rev_same_tree_as_empty(struct rev_info *revs, struct commit *commit) return 0; tree_difference = REV_TREE_SAME; - DIFF_OPT_CLR(&revs->pruning, HAS_CHANGES); + revs->pruning.flags.HAS_CHANGES = 0; retval = diff_tree_oid(NULL, &t1->object.oid, "", &revs->pruning); return retval >= 0 && (tree_difference == REV_TREE_SAME); |