diff options
author | Brandon Williams <bmwill@google.com> | 2017-10-31 19:19:09 +0100 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2017-11-01 03:50:03 +0100 |
commit | 23dcf77f48feb49c54bad09210f093a799816334 (patch) | |
tree | eff748e83bc0e1bf41b631d77d5c38f82a549ee5 /diff-no-index.c | |
parent | diff: remove DIFF_OPT_TST macro (diff) | |
download | git-23dcf77f48feb49c54bad09210f093a799816334.tar.xz git-23dcf77f48feb49c54bad09210f093a799816334.zip |
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-no-index.c')
-rw-r--r-- | diff-no-index.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/diff-no-index.c b/diff-no-index.c index 40d17e42c6..a3e1943401 100644 --- a/diff-no-index.c +++ b/diff-no-index.c @@ -276,16 +276,16 @@ void diff_no_index(struct rev_info *revs, if (!revs->diffopt.output_format) revs->diffopt.output_format = DIFF_FORMAT_PATCH; - DIFF_OPT_SET(&revs->diffopt, NO_INDEX); + revs->diffopt.flags.NO_INDEX = 1; - DIFF_OPT_SET(&revs->diffopt, RELATIVE_NAME); + revs->diffopt.flags.RELATIVE_NAME = 1; revs->diffopt.prefix = prefix; revs->max_count = -2; diff_setup_done(&revs->diffopt); setup_diff_pager(&revs->diffopt); - DIFF_OPT_SET(&revs->diffopt, EXIT_WITH_STATUS); + revs->diffopt.flags.EXIT_WITH_STATUS = 1; if (queue_diff(&revs->diffopt, paths[0], paths[1])) exit(1); |