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>
This commit is contained in:

committed by
Junio C Hamano

parent
3b69daed86
commit
23dcf77f48
@ -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;
|
||||
|
Reference in New Issue
Block a user