diff options
author | Junio C Hamano <gitster@pobox.com> | 2017-11-09 14:31:27 +0900 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2017-11-09 14:31:27 +0900 |
commit | 8cc633286a4803025d84b77c808a2c7ad8616f2f (patch) | |
tree | 624047e4917cd5113dad8f487dd8dec21985c775 /submodule.c | |
parent | bde13700105a1c945819578ce8d5c0627d52c741 (diff) | |
parent | 0d1e0e7801bb2ae22036ad09f9f5cec17e08c48b (diff) | |
download | git-8cc633286a4803025d84b77c808a2c7ad8616f2f.tar.gz |
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 'submodule.c')
-rw-r--r-- | submodule.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/submodule.c b/submodule.c index 239d94d539..3ee4a0caa7 100644 --- a/submodule.c +++ b/submodule.c @@ -183,7 +183,7 @@ void set_diffopt_flags_from_submodule_config(struct diff_options *diffopt, if (ignore) handle_ignore_submodules_arg(diffopt, ignore); else if (is_gitmodules_unmerged(&the_index)) - DIFF_OPT_SET(diffopt, IGNORE_SUBMODULES); + diffopt->flags.ignore_submodules = 1; } } @@ -402,16 +402,16 @@ const char *submodule_strategy_to_string(const struct submodule_update_strategy void handle_ignore_submodules_arg(struct diff_options *diffopt, const char *arg) { - DIFF_OPT_CLR(diffopt, IGNORE_SUBMODULES); - DIFF_OPT_CLR(diffopt, IGNORE_UNTRACKED_IN_SUBMODULES); - DIFF_OPT_CLR(diffopt, IGNORE_DIRTY_SUBMODULES); + diffopt->flags.ignore_submodules = 0; + diffopt->flags.ignore_untracked_in_submodules = 0; + diffopt->flags.ignore_dirty_submodules = 0; if (!strcmp(arg, "all")) - DIFF_OPT_SET(diffopt, IGNORE_SUBMODULES); + diffopt->flags.ignore_submodules = 1; else if (!strcmp(arg, "untracked")) - DIFF_OPT_SET(diffopt, IGNORE_UNTRACKED_IN_SUBMODULES); + diffopt->flags.ignore_untracked_in_submodules = 1; else if (!strcmp(arg, "dirty")) - DIFF_OPT_SET(diffopt, IGNORE_DIRTY_SUBMODULES); + diffopt->flags.ignore_dirty_submodules = 1; else if (strcmp(arg, "none")) die("bad --ignore-submodules argument: %s", arg); } @@ -616,7 +616,7 @@ void show_submodule_inline_diff(struct diff_options *o, const char *path, argv_array_pushf(&cp.args, "--color=%s", want_color(o->use_color) ? "always" : "never"); - if (DIFF_OPT_TST(o, REVERSE_DIFF)) { + if (o->flags.reverse_diff) { argv_array_pushf(&cp.args, "--src-prefix=%s%s/", o->b_prefix, path); argv_array_pushf(&cp.args, "--dst-prefix=%s%s/", |