diff options
author | Brandon Williams <bmwill@google.com> | 2017-10-31 11:19:09 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2017-11-01 11:50:03 +0900 |
commit | 23dcf77f48feb49c54bad09210f093a799816334 (patch) | |
tree | eff748e83bc0e1bf41b631d77d5c38f82a549ee5 /diff-lib.c | |
parent | 3b69daed861daec1923c369d59c97e46eb3c3d7b (diff) | |
download | git-23dcf77f48feb49c54bad09210f093a799816334.tar.gz |
diff: remove DIFF_OPT_SET macro
Remove the `DIFF_OPT_SET` macro and instead set the flags directly.
This conversion is done using the following semantic patch:
@@
expression E;
identifier fld;
@@
- DIFF_OPT_SET(&E, fld)
+ E.flags.fld = 1
@@
type T;
T *ptr;
identifier fld;
@@
- DIFF_OPT_SET(ptr, fld)
+ ptr->flags.fld = 1
Signed-off-by: Brandon Williams <bmwill@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'diff-lib.c')
-rw-r--r-- | diff-lib.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/diff-lib.c b/diff-lib.c index 456971b2c6..f1cc3fd510 100644 --- a/diff-lib.c +++ b/diff-lib.c @@ -545,8 +545,8 @@ int index_differs_from(const char *def, const struct diff_flags *flags, memset(&opt, 0, sizeof(opt)); opt.def = def; setup_revisions(0, NULL, &rev, &opt); - DIFF_OPT_SET(&rev.diffopt, QUICK); - DIFF_OPT_SET(&rev.diffopt, EXIT_WITH_STATUS); + rev.diffopt.flags.QUICK = 1; + rev.diffopt.flags.EXIT_WITH_STATUS = 1; if (flags) diff_flags_or(&rev.diffopt.flags, flags); rev.diffopt.ita_invisible_in_index = ita_invisible_in_index; |