add, reset: use DIFF_OPT_SET macro to set a diff flag

Instead of explicitly setting the 'DIFF_OPT_OVERRIDE_SUBMODULE_CONFIG' flag, use the 'DIFF_OPT_SET' macro. Signed-off-by: Brandon Williams <bmwill@google.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Brandon Williams committed Oct 30, 2017 at 12:46 UTC c9f348e926d300c4e254299b92e9bfe1678512d6
2 files changed +2 -2
builtin/add.c
+1 -1
@@ -116,7 +116,7 @@ int add_files_to_cache(const char *prefix,
116 rev.diffopt.output_format = DIFF_FORMAT_CALLBACK;
117 rev.diffopt.format_callback = update_callback;
118 rev.diffopt.format_callback_data = &data;
119 - rev.diffopt.flags |= DIFF_OPT_OVERRIDE_SUBMODULE_CONFIG;
119 + DIFF_OPT_SET(&rev.diffopt, OVERRIDE_SUBMODULE_CONFIG);
120 rev.max_count = 0; /* do not compare unmerged paths with stage #2 */
121 run_diff_files(&rev, DIFF_RACY_IS_MODIFIED);
122 clear_pathspec(&rev.prune_data);
builtin/reset.c
+1 -1
@@ -166,7 +166,7 @@ static int read_from_tree(const struct pathspec *pathspec,
166 opt.output_format = DIFF_FORMAT_CALLBACK;
167 opt.format_callback = update_index_from_diff;
168 opt.format_callback_data = &intent_to_add;
169 - opt.flags |= DIFF_OPT_OVERRIDE_SUBMODULE_CONFIG;
169 + DIFF_OPT_SET(&opt, OVERRIDE_SUBMODULE_CONFIG);
170
171 if (do_diff_cache(tree_oid, &opt))
172 return 1;