diff: make struct diff_flags members lowercase
Now that the flags stored in struct diff_flags are being accessed directly and not through macros, change all struct members from being uppercase to lowercase. This conversion is done using the following semantic patch: @@ expression E; @@ - E.RECURSIVE + E.recursive @@ expression E; @@ - E.TREE_IN_RECURSIVE + E.tree_in_recursive @@ expression E; @@ - E.BINARY + E.binary @@ expression E; @@ - E.TEXT + E.text @@ expression E; @@ - E.FULL_INDEX + E.full_index @@ expression E; @@ - E.SILENT_ON_REMOVE + E.silent_on_remove @@ expression E; @@ - E.FIND_COPIES_HARDER + E.find_copies_harder @@ expression E; @@ - E.FOLLOW_RENAMES + E.follow_renames @@ expression E; @@ - E.RENAME_EMPTY + E.rename_empty @@ expression E; @@ - E.HAS_CHANGES + E.has_changes @@ expression E; @@ - E.QUICK + E.quick @@ expression E; @@ - E.NO_INDEX + E.no_index @@ expression E; @@ - E.ALLOW_EXTERNAL + E.allow_external @@ expression E; @@ - E.EXIT_WITH_STATUS + E.exit_with_status @@ expression E; @@ - E.REVERSE_DIFF + E.reverse_diff @@ expression E; @@ - E.CHECK_FAILED + E.check_failed @@ expression E; @@ - E.RELATIVE_NAME + E.relative_name @@ expression E; @@ - E.IGNORE_SUBMODULES + E.ignore_submodules @@ expression E; @@ - E.DIRSTAT_CUMULATIVE + E.dirstat_cumulative @@ expression E; @@ - E.DIRSTAT_BY_FILE + E.dirstat_by_file @@ expression E; @@ - E.ALLOW_TEXTCONV + E.allow_textconv @@ expression E; @@ - E.TEXTCONV_SET_VIA_CMDLINE + E.textconv_set_via_cmdline @@ expression E; @@ - E.DIFF_FROM_CONTENTS + E.diff_from_contents @@ expression E; @@ - E.DIRTY_SUBMODULES + E.dirty_submodules @@ expression E; @@ - E.IGNORE_UNTRACKED_IN_SUBMODULES + E.ignore_untracked_in_submodules @@ expression E; @@ - E.IGNORE_DIRTY_SUBMODULES + E.ignore_dirty_submodules @@ expression E; @@ - E.OVERRIDE_SUBMODULE_CONFIG + E.override_submodule_config @@ expression E; @@ - E.DIRSTAT_BY_LINE + E.dirstat_by_line @@ expression E; @@ - E.FUNCCONTEXT + E.funccontext @@ expression E; @@ - E.PICKAXE_IGNORE_CASE + E.pickaxe_ignore_case @@ expression E; @@ - E.DEFAULT_FOLLOW_RENAMES + E.default_follow_renames 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
b2100e5291
commit
0d1e0e7801
16
submodule.c
16
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))
|
||||
diffopt->flags.IGNORE_SUBMODULES = 1;
|
||||
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)
|
||||
{
|
||||
diffopt->flags.IGNORE_SUBMODULES = 0;
|
||||
diffopt->flags.IGNORE_UNTRACKED_IN_SUBMODULES = 0;
|
||||
diffopt->flags.IGNORE_DIRTY_SUBMODULES = 0;
|
||||
diffopt->flags.ignore_submodules = 0;
|
||||
diffopt->flags.ignore_untracked_in_submodules = 0;
|
||||
diffopt->flags.ignore_dirty_submodules = 0;
|
||||
|
||||
if (!strcmp(arg, "all"))
|
||||
diffopt->flags.IGNORE_SUBMODULES = 1;
|
||||
diffopt->flags.ignore_submodules = 1;
|
||||
else if (!strcmp(arg, "untracked"))
|
||||
diffopt->flags.IGNORE_UNTRACKED_IN_SUBMODULES = 1;
|
||||
diffopt->flags.ignore_untracked_in_submodules = 1;
|
||||
else if (!strcmp(arg, "dirty"))
|
||||
diffopt->flags.IGNORE_DIRTY_SUBMODULES = 1;
|
||||
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 (o->flags.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/",
|
||||
|
||||
Reference in New Issue
Block a user