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 /builtin/am.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 'builtin/am.c')
-rw-r--r-- | builtin/am.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/builtin/am.c b/builtin/am.c index fc54724cc1..015425a0f8 100644 --- a/builtin/am.c +++ b/builtin/am.c @@ -1157,9 +1157,9 @@ static int index_has_changes(struct strbuf *sb) struct diff_options opt; diff_setup(&opt); - DIFF_OPT_SET(&opt, EXIT_WITH_STATUS); + opt.flags.EXIT_WITH_STATUS = 1; if (!sb) - DIFF_OPT_SET(&opt, QUICK); + opt.flags.QUICK = 1; do_diff_cache(&head, &opt); diffcore_std(&opt); for (i = 0; sb && i < diff_queued_diff.nr; i++) { @@ -1409,8 +1409,8 @@ static void write_commit_patch(const struct am_state *state, struct commit *comm rev_info.show_root_diff = 1; rev_info.diffopt.output_format = DIFF_FORMAT_PATCH; rev_info.no_commit_id = 1; - DIFF_OPT_SET(&rev_info.diffopt, BINARY); - DIFF_OPT_SET(&rev_info.diffopt, FULL_INDEX); + rev_info.diffopt.flags.BINARY = 1; + rev_info.diffopt.flags.FULL_INDEX = 1; rev_info.diffopt.use_color = 0; rev_info.diffopt.file = fp; rev_info.diffopt.close_file = 1; |