diff options
author | Junio C Hamano <gitster@pobox.com> | 2017-11-09 08:31:27 +0300 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2017-11-09 08:31:27 +0300 |
commit | 8cc633286a4803025d84b77c808a2c7ad8616f2f (patch) | |
tree | 624047e4917cd5113dad8f487dd8dec21985c775 /wt-status.c | |
parent | bde13700105a1c945819578ce8d5c0627d52c741 (diff) | |
parent | 0d1e0e7801bb2ae22036ad09f9f5cec17e08c48b (diff) |
Merge branch 'bw/diff-opt-impl-to-bitfields'
A single-word "unsigned flags" in the diff options is being split
into a structure with many bitfields.
* bw/diff-opt-impl-to-bitfields:
diff: make struct diff_flags members lowercase
diff: remove DIFF_OPT_CLR macro
diff: remove DIFF_OPT_SET macro
diff: remove DIFF_OPT_TST macro
diff: remove touched flags
diff: add flag to indicate textconv was set via cmdline
diff: convert flags to be stored in bitfields
add, reset: use DIFF_OPT_SET macro to set a diff flag
Diffstat (limited to 'wt-status.c')
-rw-r--r-- | wt-status.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/wt-status.c b/wt-status.c index bedef256ce..ed3271c3f3 100644 --- a/wt-status.c +++ b/wt-status.c @@ -559,12 +559,12 @@ static void wt_status_collect_changes_worktree(struct wt_status *s) init_revisions(&rev, NULL); setup_revisions(0, NULL, &rev, NULL); rev.diffopt.output_format |= DIFF_FORMAT_CALLBACK; - DIFF_OPT_SET(&rev.diffopt, DIRTY_SUBMODULES); + rev.diffopt.flags.dirty_submodules = 1; rev.diffopt.ita_invisible_in_index = 1; if (!s->show_untracked_files) - DIFF_OPT_SET(&rev.diffopt, IGNORE_UNTRACKED_IN_SUBMODULES); + rev.diffopt.flags.ignore_untracked_in_submodules = 1; if (s->ignore_submodule_arg) { - DIFF_OPT_SET(&rev.diffopt, OVERRIDE_SUBMODULE_CONFIG); + rev.diffopt.flags.override_submodule_config = 1; handle_ignore_submodules_arg(&rev.diffopt, s->ignore_submodule_arg); } rev.diffopt.format_callback = wt_status_collect_changed_cb; @@ -583,7 +583,7 @@ static void wt_status_collect_changes_index(struct wt_status *s) opt.def = s->is_initial ? EMPTY_TREE_SHA1_HEX : s->reference; setup_revisions(0, NULL, &rev, &opt); - DIFF_OPT_SET(&rev.diffopt, OVERRIDE_SUBMODULE_CONFIG); + rev.diffopt.flags.override_submodule_config = 1; rev.diffopt.ita_invisible_in_index = 1; if (s->ignore_submodule_arg) { handle_ignore_submodules_arg(&rev.diffopt, s->ignore_submodule_arg); @@ -949,7 +949,7 @@ static void wt_longstatus_print_verbose(struct wt_status *s) const char *c = color(WT_STATUS_HEADER, s); init_revisions(&rev, NULL); - DIFF_OPT_SET(&rev.diffopt, ALLOW_TEXTCONV); + rev.diffopt.flags.allow_textconv = 1; rev.diffopt.ita_invisible_in_index = 1; memset(&opt, 0, sizeof(opt)); @@ -2263,8 +2263,8 @@ int has_unstaged_changes(int ignore_submodules) init_revisions(&rev_info, NULL); if (ignore_submodules) - DIFF_OPT_SET(&rev_info.diffopt, IGNORE_SUBMODULES); - DIFF_OPT_SET(&rev_info.diffopt, QUICK); + rev_info.diffopt.flags.ignore_submodules = 1; + rev_info.diffopt.flags.quick = 1; diff_setup_done(&rev_info.diffopt); result = run_diff_files(&rev_info, 0); return diff_result_code(&rev_info.diffopt, result); @@ -2283,8 +2283,8 @@ int has_uncommitted_changes(int ignore_submodules) init_revisions(&rev_info, NULL); if (ignore_submodules) - DIFF_OPT_SET(&rev_info.diffopt, IGNORE_SUBMODULES); - DIFF_OPT_SET(&rev_info.diffopt, QUICK); + rev_info.diffopt.flags.ignore_submodules = 1; + rev_info.diffopt.flags.quick = 1; add_head_to_pending(&rev_info); diff_setup_done(&rev_info.diffopt); result = run_diff_index(&rev_info, 1); |